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

9. Why should we hire you over the others waiting to be interviewed?

2768


What is preprocessor in .net and type, where it use?

1177


Define globalization and localization.

960


What are the authentication types in asp.net?

1041


What is the server of asp.net?

1060


What is webresource axd?

854


Explain what is the procedure to create the environment for asp.net? : asp.net mvc

1009


Who can consume WebAPI?

987


What are the Types of objects in ASP

1081


What is the function used for removing an event listener?

1007


What is the purpose of master page?

892


What is asp short for?

990


What is state management techniques in asp.net?

1018


What’s the catch?

1078


What is a nested masterpage in asp.net 2.0? Can there be a master page inside a masterpage?

873