开发者

access static variable in view /master

<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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜