Avoid calling events on page refresh

Discussion in 'ASP .Net' started by =?Utf-8?B?UHJpeWE=?=, Feb 21, 2006.

  1. Hi,

    I want to avoid the events being called when page is refreshed. For eg: I
    call a button event that modifies some data in the database. If i press F5 on
    the same page again the button event is fired and data is modified. How do I
    avoid it?

    Thanks in advance
    Priya
    =?Utf-8?B?UHJpeWE=?=, Feb 21, 2006
    #1
    1. Advertising

  2. Priya,

    A part of this article

    http://msdn.microsoft.com/asp.net/c...=/library/en-us/dnvs05/html/bedrockaspnet.asp


    is talking about your problem

    Eliyahu

    "Priya" <> wrote in message
    news:...
    > Hi,
    >
    > I want to avoid the events being called when page is refreshed. For eg: I
    > call a button event that modifies some data in the database. If i press F5
    > on
    > the same page again the button event is fired and data is modified. How do
    > I
    > avoid it?
    >
    > Thanks in advance
    > Priya
    Eliyahu Goldin, Feb 21, 2006
    #2
    1. Advertising

  3. Finish every action with Response.Redirect to itself.
    That would do it.

    George.



    "Priya" <> wrote in message
    news:...
    > Hi,
    >
    > I want to avoid the events being called when page is refreshed. For eg: I
    > call a button event that modifies some data in the database. If i press F5
    > on
    > the same page again the button event is fired and data is modified. How do
    > I
    > avoid it?
    >
    > Thanks in advance
    > Priya
    George Ter-Saakov, Feb 21, 2006
    #3
    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. Alexander Malkis
    Replies:
    8
    Views:
    505
    Alexander Malkis
    Apr 14, 2004
  2. Roger23
    Replies:
    2
    Views:
    983
    Roger23
    Oct 12, 2006
  3. Pkenty
    Replies:
    0
    Views:
    377
    Pkenty
    May 28, 2004
  4. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    337
    Chris
    Aug 30, 2005
  5. rum23

    radiobutton click and avoid page refresh

    rum23, Dec 2, 2008, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    3,209
    Sarah
    Feb 15, 2011
Loading...

Share This Page