标签:
1、UpdatePanel 使用中
protected void Button1_Click(object sender, EventArgs e)
{
this.Label1.Text = "测试时间:" + DateTime.Now.ToString();
ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType(),"testalert", "<script>Test();</script>", false);
}
2、UpdatePanel 没有使用
protected void Button1_Click(object sender, EventArgs e)
{
this.Label1.Text = "测试时间:" + DateTime.Now.ToString();
ClientScriptManager cs = this.ClientScript;
cs.RegisterStartupScript(this.GetType(), "HelloWorld", "<script>alert(‘test alert‘);</script>");
}
标签:
原文地址:http://www.cnblogs.com/tianjinquan/p/4180609.html