asp.net - Check Panel to enable/disable visibility -


In case of both of these enable / disable for both of them I feel "hami". Since one of them had already been "turned on" so I have to shut them down again or I feel like I can dodge one of the checks:

  Private Zero SetPanels (if (userIsLoggedIn) {pnlAuthed.Visible = true; PnlNotAuthed.Visible = false;} and {pnlSignUpForm_NotAuthed.Visible = true; PnlSignUpForm_Authed.Visible = false;}}  

I think you are looking for something like this:

  pnlAuthed.Visible = userIsLoggedIn; PnlNotAuthed.Visible =! UserIsLoggedIn; PnlSignUpForm_NotAuthed.Visible =! UserIsLoggedIn; PnlSignUpForm_Authed.Visible = us ErIsLoggedIn;  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -