用户控件页为什么找不到.ClientScript.RegisterClientScriptBlock原因
this.Parent.Page.ClientScript.RegisterClientScriptBlock(GetType(), "msg", "alert('密码错误!')", true);
原来要先加this.Parent.Page.才能使用
本文介绍了解决用户控件页中找不到.ClientScript.RegisterClientScriptBlock问题的方法。通过添加this.Parent.Page.前缀,成功实现了客户端脚本块的注册。
用户控件页为什么找不到.ClientScript.RegisterClientScriptBlock原因
this.Parent.Page.ClientScript.RegisterClientScriptBlock(GetType(), "msg", "alert('密码错误!')", true);
原来要先加this.Parent.Page.才能使用
2541
873

被折叠的 条评论
为什么被折叠?