473,696 Members | 1,609 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Refresh page with ASP command

1 New Member
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 47746
sashi
1,754 Recognized Expert Top Contributor
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
anndr0id
3 New Member
You could do

Response.AddHea der "Refresh", "1"

or I've also used

Response.Redire ct("pagename.as p")

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

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

function CheckRefresh()
{ var aCookie = document.cookie .split("; ");
for(var i=0;i<aCookie.l ength;i++){
var aCrumb = aCookie[i].split("=");
if (aCrumb[0]=="_pageRefresh _")
{DelCookie("_pa geRefresh_");wi ndow.location.r eload(true);bre ak;}
}
}
CheckRefresh();
</script>

<a href="javascrip t:setr();histor y.go(-1);" style="padding-right:5px" title="Go Back"><img src="../images/back.gif" alt="Go Back" border="0"></a>
Nov 24 '06 #4
chrisjob012
4 New Member
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
3583
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 cases this is very undesirable. Further example: There is a PHP page in my web application that has a text box and the ability to add a note to the account the user is currently viewing. When the
3
4039
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 even Ctrl-F5), I get "page cannot be displayed" with the problem line of code being the database Open command (the starred line in the snippet below). If I press Refresh repeatedly, that doesn't help. After a minute or two, refreshing the page...
3
12916
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 recordset table on the 2nd graph page and because the user gets to it by clicking the graph, the page doesn't properly post to render the recordset table. I can click "Refresh" on 2nd page and table displays fine. Is there an ASP refresh command that...
4
3166
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 for the parent and finds the proper parent in the datagrid they then click on the accept button in the grid. Then I populate a session variable with the parent ID. I then go back to the main page and have it refresh using: ...
2
2720
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 problem is that this page shows the client Logo image, then asks to upload a new one if required, finally it should show the uploaded picture. The problem is that it doesn't. If I press F5, then I can see the updated
17
3304
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 app will ultimately be web-farmed, so I resisted using either session variables. Second, what I'm trying to do is easy. What I'm trying to prevent seems impossible.
10
23412
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? Thanks very much for your help! Fred
1
2262
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 service's WSDL. It inherits from System.Web.Services.Protocols.SoapHttpClientProtocol. * The Web service is hiding behind a load-balancing content switch
1
4128
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. The problem with this is that the refresh will either delete another record or generate an exception, something like this: An error has occurred because a control with id 'ctl00$Main$UserGrid$ctl11$ctl00' could not be located
1
2104
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 via a postback. So if you click save in our app, itll call save again if you refresh. I would like to grab that refresh and have it execute a different command which clears out the screen and repopulates the latest data (i.e. a real refresh) but...
0
8658
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9005
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8873
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6512
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5853
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4352
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3027
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2310
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.