| .NET DotNet Forum Index » ASP.NET Forum » Hiding and redisplaying an ASP.NET Panel... |
|
Page 1 of 1 |
|
| Author |
Message |
| Matt... |
Posted: Mon Oct 26, 2009 6:10 am |
|
|
|
Guest
|
Hi,
I'm writing an ASP.NET website which has a page containing a
Panel. I want the user to be able
to hide/display the panel at will by clicking a tickbox.
I have written some javascript code which either hides or displays the
panel when the tickbox is
clicked, which is working fine. Eg. It uses the following to hide the
panel:
pnlAdvancedSearch.style.display = 'none';
The problem comes when the form does a postback. If the panel is
hidden before the postback
occurs, then when the page is redrawn it doesn't display the panel (as
you'd expect). But then, clicking the tickbox results in a javascript
error, because it now doesn't recognize what the the panel
"pnlAdvancedSearch" is.
I'm probably doing this completely the wrong way. Can anyone give me
any advice?
Thanks,
Matt |
|
|
| Back to top |
|
|
|
| Gregory A. Beamer... |
Posted: Mon Oct 26, 2009 10:41 am |
|
|
|
Guest
|
Matt <odonnell_matthew at (no spam) hotmail.com> wrote in news:737bf390-3021-461c-a997-
e75ee54332b7 at (no spam) p15g2000vbl.googlegroups.com:
Quote: I'm writing an ASP.NET website which has a page containing a
Panel. I want the user to be able
to hide/display the panel at will by clicking a tickbox.
Consider trying the AJAX Toolkit Accordion Panel. It is very easy to
implement and you can reconstitute the state with a postback.
Peace and Grace,
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Twitter: at (no spam) gbworld
Blog: http://gregorybeamer.spaces.live.com
*******************************************
| Think outside the box! |
******************************************* |
|
|
| Back to top |
|
|
|
| Matt... |
Posted: Wed Oct 28, 2009 10:01 am |
|
|
|
Guest
|
Quote:
Consider trying the AJAX Toolkit Accordion Panel. It is very easy to
implement and you can reconstitute the state with a postback.
Thanks, I'll give it a go.
Matt |
|
|
| Back to top |
|
|
|
|