multiple ASCX user controls on single page

Discussion in 'ASP .Net Web Controls' started by Michał Januszczyk, Apr 8, 2004.

  1. I have the following code on my aspx page

    <%if(user_status==1){%><ctl:state1 runat="server" id="aaa"></ctl:state1><%}else if(user_status==2){%><ctl:state2 runat="server" id="bbb"></ctl:state2><%}else if(user_status==3){%><ctl:state3 runat="server" id="ccc"></ctl:state3><%}else if(user_status==4){%><ctl:state4 runat="server" id="ddd"></ctl:state4><%}%

    When I load the page, all four controls are inilialized (page_loa
    of each is fired

    Question

    Is is possible to avoid initializing all controls but the one that really should be
    displayed

    Thank
    Michał Januszczyk
     
    Michał Januszczyk, Apr 8, 2004
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.