在cs文件里设置:namespace xxx
{ public class mmmm
{
public int t=0;
private void Page_Load
{
}
private void btn_Click(.....)
{
t++;
}
}
}
{ public class mmmm
{
public int t=0;
private void Page_Load
{
}
private void btn_Click(.....)
{
t++;
}
}
}
调试欢乐多
一个会话内 Session
一页内 Viewstate
如果 用 static int xxx = 0, 多个人同时调用该页面时,xxx都是相同的。
{ public class mmmm
{
public static int t=0;//静态变量
private void Page_Load
{
}
private void btn_Click(.....)
{
t++;
}
}
}