在前面加上this.Parent.Page.就可以了,如下
this.Parent.Page.ClientScript.RegisterStartupScript(this.GetType(), "abc", "Panel()");
本文介绍了一种在页面中注册启动代码的方法,通过使用this.Parent.Page.ClientScript.RegisterStartupScript()函数,可以实现在页面加载时执行特定的JavaScript代码。
在前面加上this.Parent.Page.就可以了,如下
this.Parent.Page.ClientScript.RegisterStartupScript(this.GetType(), "abc", "Panel()");
2269
1345

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