Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Check for button click in page load...

Reply
Thread Tools

Check for button click in page load...

 
 
Bob Erwin
Guest
Posts: n/a
 
      07-02-2003
Hey,

I have an interesting problem that I need some assistance for...

It is my understanding that when you click a button on an ASP.NET page, it
will actually run the page load first and then run my button procedure. Is
there a way, that I can check to see if the button was clicked in the *page
load* before the code ever gets to my button procedure?

Mainly, I have some dynamic textboxes that I need to reset if a person
selects a radiolist, however, if they select the submit button, I don't want
to reset the textboxes.

Thanks for your help,
Bob



 
Reply With Quote
 
 
 
 
Natty Gur
Guest
Posts: n/a
 
      07-02-2003
Hi,

1) If you look at the Form.Keys collection you will found only the
Button ID
that cause the postback.

2) RaisePostBackEvent is a method that you need to overload :
override protected void RaisePostBackEvent ( IPostBackEventHandler
sourceControl,
string eventArgument)
{
string s ((WebControl)sourceControl).ID ;
}


Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
How to fire both event button click and textchanged when button is click and text is changed Amy ASP .Net 0 06-01-2006 02:33 PM
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



Advertisments