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

  • Thread starter Thread starter Kuldeep
  • Start date Start date
K

Kuldeep

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
 
Back
Top