Button click and Page refresh issue.

Discussion in 'ASP .Net' started by Lenny Shprekher, Feb 23, 2005.

  1. I am using regular server site ASP.NET button to execute function. Works
    fine, issue is that when I call page-refresh on IE after click I done it is
    calling same event again.
    Could anybody suggest how to prevent this behavior?

    Thanks,
    Leonid.
     
    Lenny Shprekher, Feb 23, 2005
    #1
    1. Advertising

  2. Leonid,

    That's built in. You can't prevent it. You should implement a sort of
    protection against this on server side. For example, to compare a piece of
    information that should change between postbacks. The same value in two
    postbacks indicates refresh button click.

    Eliyahu

    "Lenny Shprekher" <> wrote in message
    news:%...
    > I am using regular server site ASP.NET button to execute function. Works
    > fine, issue is that when I call page-refresh on IE after click I done it

    is
    > calling same event again.
    > Could anybody suggest how to prevent this behavior?
    >
    > Thanks,
    > Leonid.
    >
    >
     
    Eliyahu Goldin, Feb 23, 2005
    #2
    1. Advertising

  3. > That's built in. You can't prevent it.


    What about page property: Page.SmartNavigation = True? Seems working ...
     
    Lenny Shprekher, Feb 23, 2005
    #3
  4. Hi Lenny,
    As Goldin pointed out, thatz the way it is. When you load the page again /
    refresh it, the entire page cycle gets fired again.

    SmartNavigation means..When a page is requested by an Internet Explorer 5.5
    browser, or later, smart navigation enhances the user's experience of the
    page by performing the following:
    * eliminating the flash caused by navigation.
    * persisting the scroll position when moving from page to page.
    * persisting element focus between navigations.
    * retaining only the last page state in the browser's history.

    Smart navigation is best used with ASP.NET pages that require
    frequent postbacks but with visual content that does not change dramatically
    on return.

    This does not have anything to with your issue..

    Need any help, do post a msg back..

    Happy Coding


    "Lenny Shprekher" wrote:

    > > That's built in. You can't prevent it.

    >
    >
    > What about page property: Page.SmartNavigation = True? Seems working ...
    >
    >
    >
     
    =?Utf-8?B?VmlzaG51LUNoaXZ1a3VsYQ==?=, Feb 23, 2005
    #4
  5. > Need any help, do post a msg back..


    Could you or anybody else provide code sample?
     
    Lenny Shprekher, Feb 23, 2005
    #5
    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:
    880
    Purvi T
    Oct 19, 2004
  2. Lenny Shprekher
    Replies:
    0
    Views:
    2,340
    Lenny Shprekher
    Feb 23, 2005
  3. Fabiano

    Refresh and Button Click

    Fabiano, May 30, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    6,791
    Joe Fallon
    May 31, 2005
  4. Amy
    Replies:
    0
    Views:
    1,011
  5. Replies:
    0
    Views:
    309
Loading...

Share This Page