Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Old Age Problem: Refresh Button Causes Postback

Posted on 2009-04-17
4
Medium Priority
?
257 Views
Last Modified: 2012-06-27
This is an old problem,, but I never had it so bad like this before,,
the events are refiring when clicking the Browser refresh button.
In the Submit button in my webform, I capture the server side click
event and I update session information to track the visibilty of some
panels in a wizard type navigation ("Next >>" and "<< Back" buttons)..
but the refresh button makes another event firing and takes the whole
thing to a Choes..

redirection to the same page/ saving state in a database is dumb and
should not be mentioned as an answer .. and Please, don't reply if you
are guessing.

thanks.
0
Comment
Question by:ajay_dhakare
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
abel earned 2000 total points
ID: 24176833
> redirection to the same page/ saving state in a database is dumb > and should not be mentioned as an answer ..
ok, interesting thought about a well known technique ;) though I don't think it has anything to do with your problem

> and Please, don't reply if you are guessing.

that's tricky. You didn't provide any sources to replicate your problem with, and without seeing what's going on it will be a guessing game regardless. Should we then not answer or try to help you?

Of course not. No offense meant, but I will guess at some things you might consider for finding a solution:

  • you say that you click on a submit button and then on Refresh in the browser, result: back to original page. Normally, you should get a warning from the browser about resubmitting the page. Are you using javascript or a non-post style method, or are you using an ajax technique for updating parts (asp:UpdatePanel)
  • normally, if you click refresh on the browser (I assume you mean Ctrl-R/F5 and not a button on your form) it should refresh, i.e., the original page comes back (assuming not a re-post). There may be some bug in your this.IsPostBack branches in Page_Load
  • you mention that another event is triggered via your submit button. That can only be any of the page_xxxx events, or an event you call manually from the submit button click event. Please check your page events whether they contain resetting information
I would understand it if the above doesn't really help, but if so, please provide some extra information, preferably the code of your page or a reproducible sample.

-- Abel --


PS: you posted in the C# zone, you may want to try the ASP.NET zones, because your problem seems more applicable there. You can ask the moderators to change your zones.
0
 
LVL 39

Expert Comment

by:abel
ID: 24312361
In your question you are quite clear that you do not want unclear answers, yet you do not go back to the question or answer to any of the questions I asked and you grade B without any follow-up or explanation or possibility for the expert to clarify further. Since you are apparently new here, I would like to kindly remind you of the EE guidelines and the 10pts must system.
0
 

Author Comment

by:ajay_dhakare
ID: 24326233
Sorry guys..
I am new to this site.... I have read the grading guidelines...
Thanks for your suggetions......
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month10 days, 7 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question