When I want to display different datagrids or fields, rather than create or not,
I place the controls in panels
<asp:Panel....
I then enable or disable the visiblity of the panel that contains the UC.
I've created wizards this way and even forms using a table that has panels in
the cells.
I've even used the <tr> as <asp:TR> and have two sProcs exec, one for the UI and
the other for the data.
Certain rows w/in my table are referenced in the UI sProc and stored in SQL.
This also gives me the abilty to build an Admin interface for the cotrols that
doesn't require a build.
I can then hide a row that has say 2 cells, lable and form field that is not
supposed to conditionally disply for a certain record types.
HTH
JeffP....
"Øyvind Isaksen" <oy****@sorenso.no> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Is it possible to show/hide a usercontrol code behind?
<uc1:topart id="Topart1" runat="server"></uc1:topart>
This is what i want to do, but this does not work:
if objDR.read
me.Topart1.show 'Show usercontrol if datareader.read
else
me.Topart1.hide 'Hide usercontrol
end if
Thanks for your tips!!!