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>
精彩评论