Home All Groups Group Topic Archive Search About

User Control: Dynamic Properties!!

Author
25 Nov 2005 5:20 AM
Adam Knight
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

Author
28 Nov 2005 9:42 PM
Mats Lycken
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
>
>

Bookmark and Share