|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
User Control: Dynamic Properties!!I have just tried to assign the properties of a user control dynamically in the following way: <% If Not(Request.QueryString("lvl2") Is Nothing) Then %> <L:Links ID="LevelTwo" intAreaID="<%=Request.QueryString("lvl2")%>" intStandardID='<%# Container.DataItem("standard_id")%>' Runat="Server"/><% ElseIf Not(Request.QueryString("lvl3") Is Nothing) Then %> <L:Links ID="LevelThree" intAreaID="<%=Request.QueryString("lvl3")%>" intStandardID='<%# Container.DataItem("standard_id")%>' Runat="Server"/> <% End If %> Obviously this is incorrect. How would i go about this? Cheers, Adam Hi,
I'm sorry but I'm not sure what you're trying to accomplish, maybe you could explain a little more about what you want to do and what kind of component L:Links is? Best regards, Mats Adam Knight wrote: Show quoteHide quote > Hi all, > > I have just tried to assign the properties of a user control dynamically in > the following way: > > <% If Not(Request.QueryString("lvl2") Is Nothing) Then %> > <L:Links ID="LevelTwo" intAreaID="<%=Request.QueryString("lvl2")%>" > intStandardID='<%# Container.DataItem("standard_id")%>' Runat="Server"/> > <% ElseIf Not(Request.QueryString("lvl3") Is Nothing) Then %> > <L:Links ID="LevelThree" > intAreaID="<%=Request.QueryString("lvl3")%>" intStandardID='<%# > Container.DataItem("standard_id")%>' Runat="Server"/> > <% End If %> > > Obviously this is incorrect. > > How would i go about this? > > Cheers, > Adam > >
Other interesting topics
How to add a small HTML table under a row of a GridView
Application["TotalPlayings"]++ doesn't work Source Control Products??? Downloading file from database A translatable website ASP classic -> ASP.NET 2.0 Problem Running ASP.NET/ASP App Under VS 2005 specifying a query string in an href dynamically Disabling Link Button Column in Datagrid Connecting to Active Directory through ASP.NET Web form |
|||||||||||||||||||||||