OPEN A NEW WINDOW FROM CODEBEHIND C# WITH WINDOW.OPEN

Ashish Pandey

Total Post:128

Points:898
Posted by  Ashish Pandey
C# 
C#
 1075  View(s)
Ratings:
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.
  1. Pravesh Singh

    Post:412

    Points:2888
    Re: Open a new window from codebehind C# with window.open

    Hi Ashish,


    Try This:

    string url = "~/Printticket.aspx";

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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!