Do you know any drawback to add controls to a page on PreRender event?
please don’t answer ‘depends on your case’ I’m talking in general:-)
Do you know any drawback to add controls to a page on PreRender event?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
PreRenderevent happens after control events, so the control could not use any events.If you for example add a
ButtoninPage_PreRender, it’s too late to hook up aClickevent handler for it. At postack the button would not be recreated until after the click event had already been handled (and ignored).