PreRender Disables the User controls events

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
 
M

Martin Dechev

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top