Is there a way to disable asp.net caching on selected page. It would be nice if this can be done from the web.config.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes you can if you are willing to create your own config section: http://msdn.microsoft.com/en-us/library/2tw134k3.aspx
In your config section put something like,
You could add more properties such as duration if you like.
Then, on the page_Init method of your pages, check this configuration section and call the following where appropriate:
Edit: Tip: Put the init code in a base class that your pages inherit, so that it is only one place.