本文介绍了弹出错误“需要对象引用".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
下面是我的显示弹出窗口的代码
Hi
Below is my code to display a popup
Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "script", "alert(''Record Successfuly saved'');", true);
我收到错误消息"
i am getting a error "
Error 12 An object reference is required for the non-static field, method, or property 'System.Web.UI.Page.ClientScript.get'
你能指导怎么做吗?
谢谢
could you please guide what to do?
Thanks
推荐答案
Page.ClientScript.RegisterStartupScript(GetType(), "script","alert('Record Successfuly saved');", true);
高兴的是,如果有帮助,别忘了投票...
问候
Pleased don''t forget to vote if help...
Regards,
Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "script", "alert(''Record Successfuly saved'');", true);
这个
this
Page.ClientScript.RegisterStartupScript(this.GetType(), "aa", "<script language=''javascript''>alert(''Record Successfuly saved'');</script>");
这篇关于弹出错误“需要对象引用".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!