Global.userName
(类型)Application["变量名"]不建议这样做!!public static string userName = "tony";
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
Application["userName"] = userName;
}
//在页面访问
Page.Response.Write((string)Application["userName"]);
应该是在web.config中的AppSetting中配置全局变量,再在App_Code中建一个全局类Globals.cs读取相应的全局配置