开发者

access static variable in view /master

开发者 https://www.devze.com 2023-02-16 01:26 出处:网络
<meta http-equiv=\"refresh\" content=\"<%=SessionManager.TimeOut%>\" /> i tried this SessionManager is a static class and TimeOut is a vlaible in the class set to 20
<meta http-equiv="refresh" content="<%=SessionManager.TimeOut%>" />

i tried this

SessionManager is a static class and TimeOut is a vlaible in the class set to 20

i am expecting

<meta http-equiv="refresh" content="20" />

to be rendered but

<meta http-equiv="refresh" content="<%=SessionManager.TimeOut%>" />

is rendered

i am doing this开发者_如何学编程 in my master file


Remove runat="server" from your <head> :-)

So instead of:

<head runat="server">
    <meta http-equiv="refresh" content="<%=SessionManager.TimeOut%>" />
    ...
</head>

simply use:

<head>
    <meta http-equiv="refresh" content="<%=SessionManager.TimeOut%>" />
    ...
</head>
0

精彩评论

暂无评论...
验证码 换一张
取 消