在web.config中定义常量方法
web.config中设置:
<configuration> <appSettings> <add key="email" value="test@163.com"/> 。。。。。。
在test.aspx.cs文件中(ConfigurationManager.AppSettings的指令集::System.Configuration)
string email = ConfigurationManager.AppSettings["email"];
在test.cs中可以用你的常量了。
参考资料:
http://zhidao.baidu.com/question/336996466.html
http://stackoverflow.com/questions/1612367/asp-net-session-state-not-enabled-properly