<script language="c#" runat="server">
int iGlobal = 0;
void Page_Init()
{
iGlobal++;
msg1.Text += "<br>Page_Init() has called this line at " + DateTime.Now + " with the value of iGlobal being: " + iGlobal;
}
void Page_Load()
{
iGlobal++;
msg2.Text += "<br>Page_Load() has called this line at " + DateTime.Now + " with the value of iGlobal being: " + iGlobal;
}
</script>
<html>
<head>
<title>Automatic Event Example</title>
</head>
<body>
<form runat="server">
<input type="submit" value="Click to continue">
<br/>
<asp:label id="msg1" runat="server"/>
<asp:label id="msg2" runat="server"/>
</form>
</body>
</html>结果是百思不得其解,希望哪个高手帮我解答一下:点击提交后,为什么PAGE_INIT运行了(我跟踪了),可是msg1.Text都会从空值开始,而PAGE_LOAD就是不会变成空呢???
int iGlobal = 0;
void Page_Init()
{
iGlobal++;
msg1.Text += "<br>Page_Init() has called this line at " + DateTime.Now + " with the value of iGlobal being: " + iGlobal;
}
void Page_Load()
{
iGlobal++;
msg2.Text += "<br>Page_Load() has called this line at " + DateTime.Now + " with the value of iGlobal being: " + iGlobal;
}
</script>
<html>
<head>
<title>Automatic Event Example</title>
</head>
<body>
<form runat="server">
<input type="submit" value="Click to continue">
<br/>
<asp:label id="msg1" runat="server"/>
<asp:label id="msg2" runat="server"/>
</form>
</body>
</html>结果是百思不得其解,希望哪个高手帮我解答一下:点击提交后,为什么PAGE_INIT运行了(我跟踪了),可是msg1.Text都会从空值开始,而PAGE_LOAD就是不会变成空呢???
只有在第一次请求时会初始化页面,提交是重新读取页面
在InitializeComponent()中
将Page_Init定义事件放在Page_Load前面,就会先执行Page_Init,
反之,就先执行Page_Load
如下面就是先执行先执行Page_Init
this.Load += new System.EventHandler(this.Page_Init);
this.Load += new System.EventHandler(this.Page_Load);
点击按钮不是post吗
发起人 小龙 QQ 146841无忧第二台30人共享服务器400RMB/6G/年开始报名 2004-12-1 21:059月5日开始的无忧第一台30人共享服务器活动得到了广大51jser的积极响应
小龙在此感谢大家的支持第一台服务器已经正式上架运行了 鉴于还不断有朋友想加入此次活动
现发起无忧第二台30人共享服务器服务器规格(初定)
尺寸:1U
CPU:p4 3.06c(超线程)
内存:1G
主板:intel 875(服务器主板)
硬盘:120G SATA硬盘 × 2
阵列:RAID 0/1
带宽:100M 共享(杭州电信 总出口带宽不用多说了)
总价:12000RMB系统配制(初定)
OS:FreeBSD
网站:Apache/PHP
数据服务:MySQL
邮件服务:可商议用户:30用户一台服务器
费用:考虑到大家的用处需求不一样 所以分三种 可自由选择
网络硬盘型 6G 50人在线 400RMB/第一年
标准用户型 6G 100人在线 500RMB/第一年
超级用户型 4G 200人在线 800RMB/第一年
100-150RMB/年(第二年开始)
流量:无限制
IIS连接:见上三种方案
限制:下载站点、聊天室等占用资源极大的程序(应该没人会弄这些,大家共识)
拒绝任何与黄色、政治信息
维护服务器安全稳定运行:暂定小龙有意报名者跟帖写明那种类型即可!!!
有什么好的建议尽可提出商议~~~域名注册
国际域名:65RMB/个/年 .com/.net/.org
国内域名:120RMB/个/年 .cn/.com.cn/.net.cn/org.cn
联系人:小龙 QQ-146841关于操作系统的说明:
第一台服务器是windows操作系统
第二台考虑Linux操作系统但从现在报名的情况来看
还是考虑windows 2003 server已经报名的朋友:(17人)
rexsp(asp/.net/sql server) 标准用户型
brink(asp/asp.net/sql server) 标准用户型
titi(asp/asp.net/sql server) 超级用户型
zqyjx(ASP/ACCESS) 标准用户型
stroll(asp/.net/sql server) 网络硬盘型
5625420(asp/.net/sql server) 网络硬盘型
janee(asp/.net/sql server) 标准用户型
暖暖我的神 标准用户型
ayang(Linux) 标准用户型
一介布衣(asp/.net) 标准用户型
恍然小悟(windows) 标准用户型
蜀山御风(windows) 标准用户型
剑啸狂沙(asp/.net)
programcrazy(asp/asp.net/sql server) 标准用户型
追风(asp/asp.net/sql server) 标准用户型
hardcn(php+mysql) 标准用户型
phoenix0925(asp.net+sqlserver2000) 标准用户型网址 http://www.51js.com/viewthread.php?fpage=1&tid=26314
发起人 小龙 QQ 146841
load写你的代码