Bug in Multiview?!

G

Giorgio

Hi all,

Maybe I am being stupid or this is a bug and I need some urgent help
please.

I have a web user control with a multiview that has 2 views. I have 3
public properties setup and one of the properties will be used to
identify which view to be set as an active view.

Then on the page I have the following Function that will return a web
user control and the id3 will be used to set the active view.

Private Function GetControl(ByVal id1 As Integer, ByVal id2 As
Integer, ByVal id3 As Integer) As UserControl
Dim ctrl As ASP.components_ctrl_ascx = LoadControl("~/components/
ctrl.ascx")
ctrl.id1 = id1
ctrl.id2 = id2
ctrl.id3 = id3
Return ctrl
End Function

Then on the page I have the following code to load the controls to a
placeholder.

Me.plh1.Controls.Add(GetControl(id1, id2, id3))
Me.plh1.Controls.Add(GetControl(id4, id5, id6))

The id3 and id6 will be set as a different active view but the problem
is that I only get 1 control added to the page and that's the first
one and I don't understand why!!

If I remove the multiview control and the property that sets the
active view then the 2 controls are added to the placeholder without
any problem!!

If this is not a bug and I am being stupid then can someone please
tell me what I am doing wrong and show me some code in how to fix
this?!!

Thanks a lot
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top