ali raza

C#, .Net , and my thoughts

Monthly Archives: January 2009

How to open webform in new popup brower window from code behind

PopUp form can be open through two ways from code behind, you can use both way , parameters can be send through Query string as well

protected void Button1_Click(object sender, EventArgs e){

public void OpenNewWindow(string url)
ClientScript.RegisterStartupScript(this.GetType(), “newWindow”, String.Format(”<script>’{0}’);</script>”, url));

Public Void OpenNewWindowUsingResponse(string Url)
Response.Write("<scr" + "ipt>\r\n");
Response.Write("open('" + Url + "');\r\n");
Response.Write("</scr" + "ipt>");


Both Works fine

Export GridView from aspx page to Pdf using iTextSharp in