473,409 Members | 2,056 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,409 software developers and data experts.

Refresh page with ASP command

1
I am making a form in an ASP page. One button will send the information, the other will reset the form. When the form is sent, all values are loaded into cookies, in case the form is incomplete and returned. When the reset button is clicked, the cookies, where the values of the form are stored, will be emptied and the page should be reloaded. How do I reload the ASP page with an ASP command?
May 19 '06 #1
4 47615
sashi
1,754 Expert 1GB
hi there,

to reload a page after a preset delay..
Expand|Select|Wrap|Line Numbers
  1. <META HTTP-EQUIV="refresh" CONTENT="15">
  2.  
to redirect the page to another page after a preset time
Expand|Select|Wrap|Line Numbers
  1. <META HTTP-EQUIV="refresh" CONTENT="5; URL=http://www.somedomain.com/somepage.html">
  2.  
to reload a page with java script - link
Expand|Select|Wrap|Line Numbers
  1. <A HREF="javascript:history.go(0)">Click to refresh the page</A>
  2.  
to reload a page with java script - button
Expand|Select|Wrap|Line Numbers
  1. <FORM>
  2. <INPUT TYPE="button" onClick="history.go(0)" VALUE="Refresh">
  3. </FORM> 
  4.  
good luck my fren..
Jun 28 '06 #2
You could do

Response.AddHeader "Refresh", "1"

or I've also used

Response.Redirect("pagename.asp")

just redirecting it to the same page, thats the only way I know to do it immediately.
Jul 6 '06 #3
serj
1
Have some solution:
<script type="text/javascript">
function setr()
{DelCookie("_pageRefresh_");document.cookie = "_pageRefresh_=1;path=/;";}

function DelCookie(sName)
{document.cookie = sName + "=; expires=Fri, 31 Dec 1980 23:59:59 GMT;";}

function CheckRefresh()
{ var aCookie = document.cookie.split("; ");
for(var i=0;i<aCookie.length;i++){
var aCrumb = aCookie[i].split("=");
if (aCrumb[0]=="_pageRefresh_")
{DelCookie("_pageRefresh_");window.location.reload (true);break;}
}
}
CheckRefresh();
</script>

<a href="javascript:setr();history.go(-1);" style="padding-right:5px" title="Go Back"><img src="../images/back.gif" alt="Go Back" border="0"></a>
Nov 24 '06 #4
excuse me guys......
im new to this... so please clear my doubt... cant we do this using viewstate??...
Nov 25 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Dave Smithz | last post by:
Hi there, Working on the PHP DB I took over I have just come across a problem. When the user presses refresh in some circumstances the command they just performed will be re-performed. In some...
3
by: Dave | last post by:
Hey, I'm running a localhost web server...W2K with IIS 5.0, and I'm trying to use ASP/ADO to access my Access database. When I first load the page, everything works, but if i hit refresh (F5 or...
3
by: Scott | last post by:
I have a clickable graph that resides on page 1. If user clicks a data point on the graph, the page runs again yeilding a 2nd graph that shows a more detailed graph. Problem is, I have a...
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...
2
by: Just D. | last post by:
All, How should we refresh the current aspx frame? I disabled caching using this command on Page_Load(): Response.Cache.SetCacheability(HttpCacheability.NoCache); but it didn't help. The...
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...
10
by: Fred Nelson | last post by:
Hi: I have a VB.NET web application and I need to find a way to cause a page refresh from within my application. Does anyone know how to force the browser to refresh the current page? ...
1
by: achoo | last post by:
Is it possible to extend a Web service proxy so that it understands an HTTP refresh page? Explanation: * The Web service proxy was autogenerated by Visual Studio .NET 2003 from the Web...
1
by: J055 | last post by:
Hi I have a GridView which includes the ability to delete rows. This works fine accept for when a naughty user decides to refresh the browser thereby posting the same delete command instruction....
1
by: Areric | last post by:
Hey all, Does anyone know how i can detect a refresh of the page in the unload event on the server? The problem I'm having is that refresh automatically calls the previous event that happened...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.