Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Button Click Event Procedure being called when a Page is refreshed.

Reply
Thread Tools

Button Click Event Procedure being called when a Page is refreshed.

 
 
Kuldeep
Guest
Posts: n/a
 
      05-29-2007
Hello All,

Visual Studio 2005
ASP.NET 2.0
C#.NET 2.0

I have an application which has a Button click event procedure as given
below.

protected void btn_Click(object sender, EventArgs e)

{

Response.Write("Test this Page");

}



Once I run the application and click on the button. I get the "Test this
Page" line on the page.

Now, when I debug the application with a breakpoint being at the
Button-Click-Event-Procedure and I refresh the page (Refresh Button on the
IE), I find that the Button Click Event procedure is called again.

How can I avoid this?

Please Help.

Kuldeep








 
Reply With Quote
 
 
 
 
Mark Rae
Guest
Posts: n/a
 
      05-29-2007
"Kuldeep" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> How can I avoid this?


http://www.google.co.uk/search?sourc...revent+Refresh


--
http://www.markrae.net

 
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
Why is a button Click event also called when a textbox TextChanged event is called??? S_K ASP .Net 6 11-08-2007 07:44 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 click event being called twice on click mike parr ASP .Net 1 05-20-2004 04:02 PM



Advertisments