【发布时间】:2012-02-10 06:48:27
【问题描述】:
我将在公共静态方法中使用以下 ClientScript 函数(VS2010,C#),但它给了我一些错误(我想将它用于带有“_parent”目标的响应重定向
ClientScript.RegisterStartupScript(GetType(), "Load", "<script type='text/javascript'>window.parent.location.href = '" + a + "'; </script>");
Error 37 An object reference is required for the non-static field, method, or property 'System.Web.UI.Page.ClientScript.get'
Error 38 An object reference is required for the non-static field, method, or property 'object.GetType()'
谢谢
【问题讨论】: