Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Is it possible to prevent a browser from caching an ASPX
page?

Answer Posted / surendra singh

Just call SetNoStore on the HttpCachePolicy object exposed through the Response object's Cache property, as demonstrated here:

<%@ Page Language="C#" %>
<html>
<body>
<%
Response.Cache.SetNoStore ();
Response.Write (DateTime.Now.ToLongTimeString ());
%>
</body>
</html>
SetNoStore works by returning a Cache-Control: private, no-store header in the HTTP response. In this example, it prevents caching of a Web page that shows the current time.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where code pages are used?

1206


What is difference in .net 1.1 and .net 2.0?

1043


What is the difference between WindowsDefaultLocation and WindowsDefaultBounds?

1164


8. Why do you want to work here?

1919


What is rending process in ASP.NET?

1068


Define a static class?

978


Can we override the enablepartialrendering property of the scriptmanager class?

1122


Which method is used to force all the validation controls to run?

1034


Is it possible to change the index of primary key on table?

881


What is difference between abstract class and an interface?

940


Describe paging in asp.net?

1142


What is the parent class of all the web server control?

947


What are the different properties of server control that exists?

1144


Which property needs to be set for script manager control to extend the time before throwing time out expection if no response is received from the server?

960


In your ASP.NET 2.0 web application you want to display an image that is selected from a collection of images. What approach will you use to implementing this?

988