.net中的static类型的变量能否取代.net中的Application.
例如:
创建一个webApplication,假设名称为webApplication1,在Global.aspx中的Global类中增加一个静态的成员sGreeting.public class Global : System.Web.HttpApplication{public static string sGreeting = "China is great!";……}在WebForm1中增加一个label,名称为label1.在page_load()中为label1的text属性赋值。private void Page_Load(object sender, System.EventArgs e)
{Label1.Text = WebApplication1.Global.sGreeting;
}