Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.AppendLine("<script language = Javascript> ");
sb.AppendLine("<!--");
sb.AppendLine("function alertMe(){");
sb.AppendLine("window.open('Default.aspx?Riskid=3500', 'NewWindow', 'width=360,height=410');");
sb.AppendLine("alert('It worked!' + tempASP);");
sb.AppendLine("}");
sb.AppendLine("// -->");
sb.AppendLine("</script>");
this.ClientScript.RegisterClientScriptBlock(this.GetType(), "onload", sb.ToString());
sb = null;
public class MyPage : Page
{
public int RiskId
{
get
{
return int.Parse(Request.QueryString["Riskid"]);
}
}
}
<script language="javascript">
var tempASP = <%=RiskId;%>;
</script>
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.AppendLine("<script language = Javascript> ");
sb.AppendLine("<!--");
sb.AppendLine("function alertMe(){");
sb.AppendLine("var tempASP = " + Request.QueryString["RiskID"].ToString() + ";"
sb.AppendLine("alert('It worked!' + tempASP);");
sb.AppendLine("}");
sb.AppendLine("// -->");
sb.AppendLine("</script>");
this.ClientScript.RegisterClientScriptBlock(this.GetType(), "onload", sb.ToString());
sb = null;
<html>
<head>...</head>
<body>
<script language="javascript">
var tempASP = 1;
</script>
</body>
</html>