Saturday, March 24, 2012

Panel Problem

I have a panel which I am opopulating programatically on the page load event
(i.e. only on the first load not the post back). My added controls disappear
on postback. I would have thought the panel would remember it's state. Is
there anything I am doing wrong?Chris Kennedy wrote:
> I have a panel which I am opopulating programatically on the page load event
> (i.e. only on the first load not the post back). My added controls disappear
> on postback. I would have thought the panel would remember it's state. Is
> there anything I am doing wrong?
>

wrap an IsPostBack() around the call

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
The default controls remeber their state, but not the state of their child
controls.
You'll have to rebuild your control hierarchy inside that panel on each
postback

"Chris Kennedy" <ck001s7253nospam@.bleyonder.co.uk> wrote in message
news:%23vNrePCfFHA.1148@.TK2MSFTNGP12.phx.gbl...
> I have a panel which I am opopulating programatically on the page load
event
> (i.e. only on the first load not the post back). My added controls
disappear
> on postback. I would have thought the panel would remember it's state. Is
> there anything I am doing wrong?
>

0 comments:

Post a Comment