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
Can we store object in viewstate?
What are the memory-mapped files?
Why SessionID changes in every request in asp.net?
Where the cookie value is stored?
What is asp.net mvc? : asp.net mvc
What is runat?
To display data in the combo box, prior to setting the Data Source, what kind of property on a Combo Box do you set with a column name?
What is a runtime version?
What is the difference between a multi-layer and multi-tier applications?
When you use Ajax controls in the ASP.NET application?
What are the different properties of server control that exists?
Explain the asp.net page life cycle.
if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....
I have created a configuration setting in my web.config and have kept it at the root level. How do I prevent it from being overridden by another web.config that appears lower in the hierarchy?
Hello, Using Visual Studio 2005 (VB) I am working to create a Web Site implementing the following: Within a gridView I have placed a dropdownlist control with a DataSourceID="SDSLkupList". SDSLkupList is a sqlDataSource used to store a lookup list for dropdownlist translation from ID to text. SDSLkupList contains the translation text and other fields related to the dropdown selection ID. (Thought it would be efficient to get everything at the same time.) I would like to provide the user the ability to select from the dropdownlist and, based on the selection, use labels to list related columns stored on the SDSLkupList in separate gridView columns. I have read that SqlDataSources are not meant to be used for individual controls. Since SDSLkupList contains all related information, is there a way to do a find using the dropdownlist selectedValue? (I was not able to discover one.) Otherwise, what should I use? It would need to set the labels on the gridView DataRowBound event as well as the SelectedIndexChanged events. Has anyone done this? Any help would be appreciated. Thanks in Advance. Neal