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?

    Lenny Shprekher, Feb 23, 2005
    1. Advertisements

  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 Goldin, Feb 23, 2005
    1. Advertisements

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

    What about page property: Page.SmartNavigation = True? Seems working ...
    Lenny Shprekher, Feb 23, 2005
  4. Lenny Shprekher

    Guest Guest

    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
    Guest, Feb 23, 2005
  5. Need any help, do post a msg back..

    Could you or anybody else provide code sample?
    Lenny Shprekher, Feb 23, 2005
    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.