473,385 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Refresh button

I'm sure this has to be in an FAQ somewhere, but I
couldn't find anything about it. When I click
the "Refresh" button in my browser I preform the last HTTP
method I did. Needless to say, this is not the
functionality of a refresh button that I would like.

When I click on "Refresh" I want the page to completely
reload and drop all of the view state information it is
currently holding and treat it like a brand new request.
(Basically, like how a refresh does with classic ASP and
HTML, etc.)

Is there any way to get around this new "feature" of
ASP.NET?

Thanks,
Jeremy
Nov 17 '05 #1
2 3472
You can clear your ViewState information programmatically or you can turn it
off if you don't want it at all. You could try detecting on Page_Load
whether your code has "seen" the page in its current state and then skip any
re-processing or you could try trapping the refresh event with javascript.
I guess one question would be: why do you want to do this (or not do this,
to be more precise)?

Regards,
Stephen

"Jeremy" <Jk*******@NOhotmailSPAM.com> wrote in message
news:08****************************@phx.gbl...
I'm sure this has to be in an FAQ somewhere, but I
couldn't find anything about it. When I click
the "Refresh" button in my browser I preform the last HTTP
method I did. Needless to say, this is not the
functionality of a refresh button that I would like.

When I click on "Refresh" I want the page to completely
reload and drop all of the view state information it is
currently holding and treat it like a brand new request.
(Basically, like how a refresh does with classic ASP and
HTML, etc.)

Is there any way to get around this new "feature" of
ASP.NET?

Thanks,
Jeremy

Nov 17 '05 #2
You can clear your ViewState information programmatically or you can turn it
off if you don't want it at all. You could try detecting on Page_Load
whether your code has "seen" the page in its current state and then skip any
re-processing or you could try trapping the refresh event with javascript.
I guess one question would be: why do you want to do this (or not do this,
to be more precise)?

Regards,
Stephen

"Jeremy" <Jk*******@NOhotmailSPAM.com> wrote in message
news:08****************************@phx.gbl...
I'm sure this has to be in an FAQ somewhere, but I
couldn't find anything about it. When I click
the "Refresh" button in my browser I preform the last HTTP
method I did. Needless to say, this is not the
functionality of a refresh button that I would like.

When I click on "Refresh" I want the page to completely
reload and drop all of the view state information it is
currently holding and treat it like a brand new request.
(Basically, like how a refresh does with classic ASP and
HTML, etc.)

Is there any way to get around this new "feature" of
ASP.NET?

Thanks,
Jeremy

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Tom Post | last post by:
I am doing a simple php header refresh -- header('refresh: 10; url=msgs.php'); that just does a call back to my script every 10 seconds. Things work great when the page is first loaded up, but if...
9
by: Mark | last post by:
I have a working PHP/MySQL application used for data entry. The data entry screen includes a "Save" button. The PHP code for this button looks like this: if (isset($_POST)) { if ($_POST ==...
4
by: Andrew Alger | last post by:
ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button on Customer.aspx that when executed runs javascript code to open up parent_search as a popup. After the user searches...
6
by: laura | last post by:
I'm doing a page which gathers some text in the form of a text box in a <form>. This text is saved to a text file, notices.txt and I want to be able to display the saved text on the page, as soon...
10
by: tasmisr | last post by:
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...
1
by: ppatel | last post by:
Problem I have a problem with web image button control click event. The click event does not get trigger until it has not been clicked once or page refresh occures(which is fine). When click...
9
by: PK9 | last post by:
I'm having an issue with the "Refresh" of an asp.net page. The refresh is actually calling my last onClick event. I thought that asp.net was supposed to be stateless in that it shouldn't...
17
by: Jim Little | last post by:
Hello, I'm driving myself crazy either because I'm missing something about ASP.NET, or what I'm trying to do simply can't be done. First, I am not using session variables to track state. My...
3
by: Sameer | last post by:
I have a webpage that has a link button. This link button on click opens up a new page. This is what is happening: 1. Load the web page. 2. Click on the link. 3. Refresh the web-page. Result:...
3
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hi all, i betcha here's a question never asked before ;) i have a simple web form with a gridview and a button. the button doesn't do anything but a postback. i load up the gridview from the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.