Opening New Window using Response.Redirect in ASP.Net

hi friends …

when i came through this problem .. i searched in google so many times for the solution

but i didnt got any solution using Response.Redirect

but i can provide you with alternative solution using javascript in your c# code behind

as follows

using System.text

StringBuilder sb = new StringBuilder();

sb.Append(“<SCRIPT LANGUAGE=\”JavaScript\”>”);

sb.Append(“{“);

sb.Append(“var win =”);

sb.Append(“window.open(‘Home.aspx’,’_blank’,”);

sb.Append(“‘menubar=no,scrollbars=no,”);

sb.Append(“width=1000,height=700,top=0,left=0′);”);

sb.Append(“window.opener = ‘OPENER_IS_NOT_NULL’;”);

//sb.Append(“window.close();”)

sb.Append(“}”);

sb.Append(“</SCRIPT>”);

Page.RegisterStartupScript(“”, sb.ToString());



in the Above programe iam opening Home.aspx page in a new window


Advertisements

About kakani santosh kumar

Working as Software Engineer in Prithvi Information Solutions having 3 years of Experience in Dotnet Framework ranging from 1.1 to 3.5
This entry was posted in Programming and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s