Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Button click event handler

Reply
Thread Tools

Button click event handler

 
 
Patrick
Guest
Posts: n/a
 
      01-17-2004
I am confused...I have a form with a button on it. when it is clicked, the Page_Init and Page_Load functions are called, THEN the button handler is called. I need to handle the click PRIOR to the Page_Init and Page_Load so that I can setup some dynamic controls in the Page_Init that are created as a result of the click event. How would I do this?
 
Reply With Quote
 
 
 
 
Victor Garcia Aprea [MVP]
Guest
Posts: n/a
 
      01-17-2004
Hi Patrick,

You can't change the order in which events are fired. As you have noted,
postback events will always fire after Init and Load. Any code that depends
on some values updated by a click event should run in an event that fires
after it, i.e. PreRender.

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

"Patrick" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I am confused...I have a form with a button on it. when it is clicked,

the Page_Init and Page_Load functions are called, THEN the button handler is
called. I need to handle the click PRIOR to the Page_Init and Page_Load so
that I can setup some dynamic controls in the Page_Init that are created as
a result of the click event. How would I do this?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
image button click event fires before click event of button Purvi T ASP .Net 0 10-19-2004 06:19 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Building Controls 1 05-28-2004 06:23 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net 2 05-25-2004 11:45 PM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Datagrid Control 0 05-25-2004 01:45 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Web Controls 0 05-25-2004 01:45 AM



Advertisments