G
Guest
I am writing an ASP.NET 2.0 application that uses master pages. I have some
pages that must not be cached on the client. In ASP.NET 1.1 I achieved this
using metatags:
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
This tags are part of the <head> element. Sample code that I have seen
shows how to add metatags of the form:
<meta name="KEYWORDS" content="html, webdesign, javascript">
Documentation and literature says to use code in the Page_Load event handler
as follows:
base.Master.Page.Header.Metadata.Add("Keywords", "html,...");
However when I attempt this I get a compile error indicating that Header
does not have a Metadata property.
How can I programmatically add the needed metatags to an Master page derived
aspx page to disable client-side caching?
As always, any guidance is greatly appreciated.
Eagle
pages that must not be cached on the client. In ASP.NET 1.1 I achieved this
using metatags:
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
This tags are part of the <head> element. Sample code that I have seen
shows how to add metatags of the form:
<meta name="KEYWORDS" content="html, webdesign, javascript">
Documentation and literature says to use code in the Page_Load event handler
as follows:
base.Master.Page.Header.Metadata.Add("Keywords", "html,...");
However when I attempt this I get a compile error indicating that Header
does not have a Metadata property.
How can I programmatically add the needed metatags to an Master page derived
aspx page to disable client-side caching?
As always, any guidance is greatly appreciated.
Eagle