PreRender Disables the User controls events

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have creating dynamic usercontrols in Page_PreRender event. It works fine.
But Inside usercontrol i have a Button. PreRender event disable the
usercontrol Button click. What can i do to overcome this?

Help is greatly Appreciated.

Thanks
John
 
Hi, John,

It is too late for the event to get fired. Add the controls in the Page_Init
(preferably) or Page_Load handlers.

Hope this helps
Martin
 
Back
Top