Home > DeveloperSection > Forums > Open a new window from codebehind C# with window.open
Ashish Pandey

Total Post:128

Posted on    January-29-2014 11:24 PM

 C# C# 

 1 Reply(s)
 1011  View(s)
Rate this:

I want to open a new windowand I have tried window.open

string url = "../Printticket.aspx";

       string fullURL = "window.open('" + url + "', '_blank', 'height=600,width=1000,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,titlebar=no' );";

        ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", fullURL, true);

when i tried this from the samefolder which the print ticket ,is there I am getting it right but when i tried it from the different folder iam not getting popup

Please Help.

Pravesh Singh

Total Post:412

Posted on    January-29-2014 11:46 PM

Hi Ashish,

Try This:

string url = "~/Printticket.aspx";

Your url path plus your form name like ~/SomeFolder//Printticket.aspx

Don't want to miss updates? Please click the below button!

Follow MindStick