Code
on page loadJava
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());Code
C#
after using this the tab is open but when i want to close the tab after 40 sec then my code is not working //For closingCode
* I am also using timer for another workCode
string jScript = "script>window.close();script>"; ClientScript.RegisterClientScriptBlock(this.GetType(), "timer1_tick", jScript);

Joginder BangerRank #360 · 7K reputationPosted Mar 20, 2015, 12:15 PM EDT
first of all make a question in well format, after than any buddy understand what is the problem
Harpreet SinghRank #312 · 8.1K reputationPosted Mar 20, 2015, 11:39 PM EDT
If you want to know more about this setTimeout function follow the link given below
http://www.w3schools.com/jsref/met_win_settimeout.asp
Aditya Chauhan121 reputationPosted Mar 21, 2015, 1:09 AM EDT
Harpreet SinghRank #312 · 8.1K reputationPosted Mar 21, 2015, 1:36 AM EDT
Aditya Chauhan121 reputationPosted Mar 21, 2015, 10:14 AM EDT