Button click and Page refresh issue.

L

Lenny Shprekher

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.
 
E

Eliyahu Goldin

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
 
L

Lenny Shprekher

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


What about page property: Page.SmartNavigation = True? Seems working ...
 
G

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
 
L

Lenny Shprekher

Need any help, do post a msg back..


Could you or anybody else provide code sample?
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top