日期:2014-05-17 浏览次数:20539 次
String csname1 = "PopupScript1";
Type cstype = this.GetType();
ClientScriptManager cs = Page.ClientScript;
if (!cs.IsStartupScriptRegistered(cstype, csname1))
{
String cstext1 = "alert('用户或密码不正确!');";
cs.RegisterStartupScript(cstype, csname1, cstext1, true);
}
------解决方案--------------------
this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "key", "alert('添加成功!');", true);
不会空白的,有没有试啊!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
------解决方案--------------------
Page.RegisterStartupScript("", "<script>alert('填写不能有空!请认真填写!');</script>");