输出缓存是否可以在master上进行 [英] output caching is possible on master or not

查看:81
本文介绍了输出缓存是否可以在master上进行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



如何在母版页上使用输出缓存。



因为,我想缓存整个母版页。



但是当我在母版页上使用输出缓存时,我收到此错误:

解析器错误消息:此处不允许使用'ETS.AddDepartment',因为它不扩展类'System.Web.UI.Page'。







当我点击母版页面菜单中的任何链接时,
整个页面都会闪烁...包括母版页。

i不想让主页点亮...点击菜单列表。





我知道吗我该怎么办...请



谢谢

解决方案

Heyy!

只需尝试这些



<! - 使用母版页 - >

< meta http-equiv ="期满" Content =" 0">

< meta http-equiv =" Program" Content =" no-cache"

< meta http-equiv =" Cache-Control" Content =" no-cache"



或者你也可以使用这个



回应。 Cache.SetNoStore();

Hi guys,

How can i use output caching on master page.

Because, i want to cache whole master page.

but when i'm using output caching on master page, i get this error:

Parser Error Message: 'ETS.AddDepartment' is not allowed here because it does not extend class 'System.Web.UI.Page'.




When i'm clicking on any link in the menu of the master page,
the whole page is getting blink... including master page as well.

i dont want to blink master page... on clicking on the menu list.



May i know how can i do...please

thanks

解决方案

Heyy!
just try these

<!-- using master page -->
<meta http-equiv = "Expires" Content = "0">
<meta http-equiv = "Program" Content = "no-cache">
<meta http-equiv = "Cache-Control" Content = "no-cache">

or you can use alternatively this

Response.Cache.SetNoStore();


这篇关于输出缓存是否可以在master上进行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆