V
voro.cibus
I have been reading up on this all day, and I can't find the answer (or
more likely, don't understand the answers I have found) to my problem.
I have a table that stores the name of my ascx page. My main page can
be called on to load any of the pages referenced in my table.
Therefore, I have no @Register controls in my aspx file.
What I do have is this
dim myUC as control = Page.LoadControl("~/reqforms/" &
GetReqForm(requestID))
mainForm.Controls.Add(myUC)
mainForm is an asplaceholder I have in the apsx page.
Each of my ascx pages has a public property called rid. What I need to
do is pass requestID to the ascx's rid.
I have seen this mentioned
myUC = ctype(myUC, myUserControl).rid = requestID
The problem I have seen with these though is that they have a page
directive in which they set the classname of the user control. Since I
have no page directives for my dynamically loaded controls, how do I
set the classname? Or am I going in the wrong direction here?
I am basically at a loss, and at the edge of my understanding of vb.net
(been doing this for only 3 months now), so a clear answer with code,
preferably in vb.net would be of immense help to me.
more likely, don't understand the answers I have found) to my problem.
I have a table that stores the name of my ascx page. My main page can
be called on to load any of the pages referenced in my table.
Therefore, I have no @Register controls in my aspx file.
What I do have is this
dim myUC as control = Page.LoadControl("~/reqforms/" &
GetReqForm(requestID))
mainForm.Controls.Add(myUC)
mainForm is an asplaceholder I have in the apsx page.
Each of my ascx pages has a public property called rid. What I need to
do is pass requestID to the ascx's rid.
I have seen this mentioned
myUC = ctype(myUC, myUserControl).rid = requestID
The problem I have seen with these though is that they have a page
directive in which they set the classname of the user control. Since I
have no page directives for my dynamically loaded controls, how do I
set the classname? Or am I going in the wrong direction here?
I am basically at a loss, and at the edge of my understanding of vb.net
(been doing this for only 3 months now), so a clear answer with code,
preferably in vb.net would be of immense help to me.