Hello Team i am just open a tab with java script in c# //here StringBuilder sb = new StringBuilder(); sb.Append("<script type = 'text/javascript'>"); sb.Append("window.open('"); sb.Append(url); Session["url"] = url.ToString(); sb.Append("');"); sb.Append("</script>"); ClientScript.RegisterStartupScript(this.GetType(), "script", sb.ToString()); //this is f9 perfactly ... and i want to close the open tab(url) after 40 seconds how it possible i am using string jScript = "<script>window.close();</script>"; ClientScript.RegisterClientScriptBlock(this.GetType(), "btnsubmit", jScript); //this work with btnsubmit on any other form but here is not working .. i am just want to perform it with timer event or any other option you have please suggest..
window.open
var someWindow = window.open(/* ... */); // ... someWindow.close();
setTimeout("window.close()",40000);
string jScript = "<script>indow.open('', '_self', ''); window.close();</script>"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)