Amir Mirkamali

امیر میرکمالی

Open New Window After Button Click and After running Server Side Code

Add your code in button click add this code (replace your link in the code)

 private void btn_Click(object sender, EventArgs e)
{

.....

 StringBuilder script = new StringBuilder();
script.Append("<script>");
script.AppendFormat("window.open('{0}', '', '');", link);
script.Append("</scri");
script.Append("pt>");
Page.RegisterStartupScript("opennewwindow", script.ToString());

.....

}
Comments are closed