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

Discussion in 'ASP .Net' started by Kuldeep, May 29, 2007.

  1. Kuldeep

    Kuldeep Guest

    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
    Kuldeep, May 29, 2007
    #1
    1. Advertising

  2. Kuldeep

    Mark Rae Guest

    Mark Rae, May 29, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Purvi T
    Replies:
    0
    Views:
    830
    Purvi T
    Oct 19, 2004
  2. mike parr
    Replies:
    1
    Views:
    470
    Marina
    May 20, 2004
  3. SSS
    Replies:
    4
    Views:
    430
  4. Mike Grace
    Replies:
    5
    Views:
    537
    Mike Grace
    May 5, 2006
  5. S_K
    Replies:
    6
    Views:
    1,178
    Robert Dunlop
    Nov 8, 2007
Loading...

Share This Page