hi all,
I have a form with 2 panels...and data form one and a thanking-you one
' Show/Hide the relevant panel
panelForm.Visible = False
panelThankYou.Visible = True
This is what I currently use on my code after a the form has been
successfully completed etc, just wondering, do I need to add the = False bit
for the form panel or will, by making the thankyou one true automatically
make the others false? Should I do it anyway?
Any info appreciated, I only ask because I am about to add a third panel and
I could be writing code I dont really need.
Thanks in advance,
Robdo it, always.
--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Rob Meade" <robert.meade@.NOSPAMubht.swest.nhs.uk> wrote in message
news:uGiqagn5DHA.3896@.TK2MSFTNGP11.phx.gbl...
> hi all,
> I have a form with 2 panels...and data form one and a thanking-you one
> ' Show/Hide the relevant panel
> panelForm.Visible = False
> panelThankYou.Visible = True
> This is what I currently use on my code after a the form has been
> successfully completed etc, just wondering, do I need to add the = False
bit
> for the form panel or will, by making the thankyou one true automatically
> make the others false? Should I do it anyway?
> Any info appreciated, I only ask because I am about to add a third panel
and
> I could be writing code I dont really need.
> Thanks in advance,
> Rob
What you do with one panel, doesn't change what happens to the other. There
is no law that says only one panel can be visible at at ime.
"Rob Meade" <robert.meade@.NOSPAMubht.swest.nhs.uk> wrote in message
news:uGiqagn5DHA.3896@.TK2MSFTNGP11.phx.gbl...
> hi all,
> I have a form with 2 panels...and data form one and a thanking-you one
> ' Show/Hide the relevant panel
> panelForm.Visible = False
> panelThankYou.Visible = True
> This is what I currently use on my code after a the form has been
> successfully completed etc, just wondering, do I need to add the = False
bit
> for the form panel or will, by making the thankyou one true automatically
> make the others false? Should I do it anyway?
> Any info appreciated, I only ask because I am about to add a third panel
and
> I could be writing code I dont really need.
> Thanks in advance,
> Rob
Oh no, nothing like that would happen automatically, asp.net is going to
display whatever it can (it doesn't just display only one panel at a time).
For readability I'd set everything to the way you want it, when you want it.
I try not to even think of the default "visible" property for panels when
I'm working on making certian ones visible/hidden. Even if the default
value for the panel is already set the way I want it, it can't hurt to reset
it, and makes the code much easier to look at. Just my opinion on the
matter.
HTH,
--Michael
"Rob Meade" <robert.meade@.NOSPAMubht.swest.nhs.uk> wrote in message
news:uGiqagn5DHA.3896@.TK2MSFTNGP11.phx.gbl...
> hi all,
> I have a form with 2 panels...and data form one and a thanking-you one
> ' Show/Hide the relevant panel
> panelForm.Visible = False
> panelThankYou.Visible = True
> This is what I currently use on my code after a the form has been
> successfully completed etc, just wondering, do I need to add the = False
bit
> for the form panel or will, by making the thankyou one true automatically
> make the others false? Should I do it anyway?
> Any info appreciated, I only ask because I am about to add a third panel
and
> I could be writing code I dont really need.
> Thanks in advance,
> Rob
...cheers to all for the advice, I have adopted that now (hopefully I'll not
be adding any more panels to this page anyway - heh!)...
Regards
Rob
Wednesday, March 21, 2012
Panels Question
Labels:
asp,
form,
hide,
net,
panelpanelform,
panels,
relevant,
thanking-you,
visible
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment