Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Button click and Page refresh issue.

Reply
Thread Tools

Button click and Page refresh issue.

 
 
Lenny Shprekher
Guest
Posts: n/a
 
      02-23-2005
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.


 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      02-23-2005
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.
>
>



 
Reply With Quote
 
 
 
 
Lenny Shprekher
Guest
Posts: n/a
 
      02-23-2005
> That's built in. You can't prevent it.


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


 
Reply With Quote
 
=?Utf-8?B?VmlzaG51LUNoaXZ1a3VsYQ==?=
Guest
Posts: n/a
 
      02-23-2005
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 ...
>
>
>

 
Reply With Quote
 
Lenny Shprekher
Guest
Posts: n/a
 
      02-23-2005
> Need any help, do post a msg back..


Could you or anybody else provide code sample?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to fire both event button click and textchanged when button is click and text is changed Amy ASP .Net 0 06-01-2006 02:33 PM
Page.SmartNavigation = True (Button click and Page refresh issue) Lenny Shprekher ASP .Net 0 02-23-2005 06:39 PM
image button click event fires before click event of button Purvi T ASP .Net 0 10-19-2004 06:19 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Building Controls 1 05-28-2004 06:23 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net 2 05-25-2004 11:45 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57