Friday, April 29, 2011

Ajax.net but no script

I want use ajax.net to do some js. like below:

ScriptManager.RegisterStartupScript(Submit, typeof(Button), "alert", "location.href='test.aspx';", true);

If user turn off the javascript, it will not redirect to another page.

I want to know how to set <noscript></noscript>.

Thanks a lot!!

From stackoverflow
  • Here:

    <noscript>
      <meta http-equiv="refresh" content="0; URL='no-script.aspx'">
    </noscript>
    
  • I would use Response.Redirect("test.aspx") which does not require JavaScript and should be supported by most of the modern browsers.

0 comments:

Post a Comment