title: ASP.NET how to call clientscript from public static method
body: <p>I'm going to use following ClientScript function (VS2010,C#) in a public static method, but it gives me some errors (I want to use it for response redirect with "_parent" target</p>
  
  <pre><code>                ClientScript.RegisterStartupScript(GetType(), "Load", "&lt;script type='text/javascript'&gt;window.parent.location.href = '" + a + "'; &lt;/script&gt;");
  
  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()'    
  </code></pre>
  
  <p>thanks</p>