473,387 Members | 1,530 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,387 software developers and data experts.

How to refresh a web form in asp.net using responce.redirect

hi,


iam have two pages sample1.aspx and sample2.aspx.

When i am trying to re-directing sample1.aspx from sample2.aspx,

using response.redirect("sample1.aspx").

and when i try to refresh the sample1.aspx page, by clearing the catch using the following code,even its not refreshing.

Response.Buffer = true;

Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
Response.Expires = -1;
Response.CacheControl = "no-cache";


Can any one please find a solution for refreshing in asp.net

Thanks.
Onlineaccident
Feb 26 '08 #1
1 1447
Plater
7,872 Expert 4TB
This code is inside of sample1.aspx right?
Expand|Select|Wrap|Line Numbers
  1. Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
  2. Response.Expires = -1;
  3. Response.CacheControl = "no-cache";
  4.  
Becuase it wouldn't do any good to have it be in sample2.aspx when it's redirecting to sample1.aspx
Feb 26 '08 #2

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

Similar topics

1
by: Michael Minter | last post by:
I'm just new at this so any help more than appreciated. I have created an email form in which all fields must be completed. If all the fields are not completed "submit" causes a refresh using...
4
by: John | last post by:
I get the feeling this is a pretty classic problem, but I'm a bit of an uber newber. Apologies! Products page, user enters a quantity and clicks one of my "Add to Cart" buttons, which bubbles up...
8
by: Judy Ward | last post by:
I have an index.aspx with frames. The top frame has a navigation bar with a "Login" hyperlink. If the user has already logged in I want this link to change to "Logout". I am using forms-based...
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...
8
by: Nathan Sokalski | last post by:
I have a form that submits data to a database. If I click the browser's refresh button after submitting the form once, the form is submitted a second time. How can I avoid this problem? Thanks. --...
8
by: Radx | last post by:
Here in my web application, I have a data entry page with serval controls. Some of the controls have autopostback is set true. But the problem is when two or more people are entering data at the...
3
by: Ned Balzer | last post by:
Hi all, I posted this question some time ago in an earlier thread but so far I still don't have an understanding of why this is happening or what I can do to fix it. I use Session variables,...
2
by: punjabplus | last post by:
hi, i want help for-- like responce.redirect("default.aspx?test=one"); query string . on redirect page address bar we have value like http:// default.aspx?test=one is there any way we can...
2
by: qwedster | last post by:
Folks! The following is a "Hello World" kind of code for ViewState. I just want to know how to retain the ViewState 1) while Page Refresh when using UpdatePanel and also 2) While I reverting back...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.