467,912 Members | 1,782 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,912 developers. It's quick & easy.

PlaceHolder Disappears on Page PostBack

Hi all,

I have a placeholder control on an ASPX page. I
dynamically add a few button control and label control to the placeholder
from
code - all is well with the world. But on post back the
control disappears from the placeholder. Am I missing
something here
Please help

Vishal Gupta
Jun 1 '06 #1
  • viewed: 3272
Share:
2 Replies
Hi,

You have to recreate them in the postback
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Vishal Gupta" <vi**********@acs-inc.com> wrote in message
news:eo*************@TK2MSFTNGP03.phx.gbl...
Hi all,

I have a placeholder control on an ASPX page. I
dynamically add a few button control and label control to the placeholder
from
code - all is well with the world. But on post back the
control disappears from the placeholder. Am I missing
something here
Please help

Vishal Gupta

Jun 1 '06 #2
i think i found a better solution.. We can do in Page_init Method...

ASP.NET pages automatically bind page events to methods that have the name
Page_event. This automatic binding is configured by the AutoEventWireup
attribute in the @ Page directive, which is set to true by default. If you
set AutoEventWireup to false, the page does not automatically search for
methods that use the Page_event naming convention.
http://msdn2.microsoft.com/en-us/library/6w2tb12s.aspx
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:u$**************@TK2MSFTNGP03.phx.gbl...
Hi,

You have to recreate them in the postback
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Vishal Gupta" <vi**********@acs-inc.com> wrote in message
news:eo*************@TK2MSFTNGP03.phx.gbl...
Hi all,

I have a placeholder control on an ASPX page. I
dynamically add a few button control and label control to the placeholder
from
code - all is well with the world. But on post back the
control disappears from the placeholder. Am I missing
something here
Please help

Vishal Gupta


Jun 1 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by dwhitford | last post: by
1 post views Thread by Fraggle | last post: by
1 post views Thread by Angel | last post: by
1 post views Thread by Ralph Krausse | last post: by
9 posts views Thread by Anders K. Jacobsen [DK] | last post: by
1 post views Thread by Simon Wallis | last post: by
1 post views Thread by Amir Ghezelbash | last post: by
3 posts views Thread by Oren | last post: by
reply views Thread by F | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.