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

    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, May 29, 2007
    1. Advertisements

  2. Kuldeep

    Mark Rae Guest

    Mark Rae, May 29, 2007
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.