在ascx里,Page_Load里的方法可以只被执行一次吗?
比如我在5个页面里嵌入了这个ascx,但是我只想在其中一个页面打开的时候执行Page_Load
里的方法。
比如我在5个页面里嵌入了这个ascx,但是我只想在其中一个页面打开的时候执行Page_Load
里的方法。
解决方案 »
- 指定的参数已超出有效值的范围。index?
- 有没有人知道116.18.239.145这个IP是哪家公司的啊???
- ******简单的POST页面为什么会不提交,急死多了,大家快来帮忙*****
- 将截断字符串或二进制数据
- 请教在页面嵌入显示服务端的word文件
- 紧急求救----一个用户注册过程的求救和提示!C.NET存+sql server 2000
- 关于session问题
- 求助!!!!!!!!--------运行asp.net网页出现相同乱码
- 【讨论】WCF不用证书实现自定义用户名密码验证以及WCF在IIS7上的部署
- asp.net MVC4 怎么连接数据库啊?
- 取一月到当前月的所有的费用
- 急急急!!!如何不用控件显示(比如用Lable显示),跪求CS,页面代码
判断 if (this.Page is Page3) { execute ...}
/// <summary>
/// Handles the Load event of the Page control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack && Request.QueryString["XX"]="exec")
{
.......
}
}