I have found a rather useful method for the server side:
Everything is done in the code-behind page, and makes use of cleverly placed Session variables.
protected void Page_Load(object sender, EventArgs e)
if (Session["JSChecked"] == null)
Session["JSChecked"] = "Checked";
@"='text/jscript'> window.location " +
@"= 'default.aspx?JScript=1'; </script>");
if (Request.QueryString["JScript"] != null)
Session["JsWorks"] = "True";
if (Session["JsWorks"] == null)
Session["JsWorks"] = "False";
<html> tags are loaded.
@" window.location = 'default.aspx?JScript=1'; </script>");
Points of Interest
alert(''); methods within the script tag.
Please view my new article on how to achieve this using the Script Manager and a
- Last update - 19/04/2007.