---
title: "Open a new window from codebehind C# with window.open"  
description: "Open a new window from codebehind C# with window.open"  
author: "Anonymous User"  
published: 2014-01-29  
updated: 2014-01-29  
canonical: https://www.mindstick.com/forum/1911/open-a-new-window-from-codebehind-c-sharp-with-window-open  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Open a new window from codebehind C# with window.open

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](https://www.mindstick.com/blog/301752/types-of-3d-printing-technology) ticket ,is there I [am getting](https://www.mindstick.com/forum/34179/i-am-getting-error-while-assigning-the-data-to-the-array-list) it [right](https://www.mindstick.com/articles/12766/check-whether-you-are-doing-digital-transformation-right-or-not) but when i tried it from the different folder [iam](https://answers.mindstick.com/blog/40/iam-identity-and-access-management-a-complete-guide) not getting [popup](https://www.mindstick.com/blog/11734/how-to-create-advanced-popup-or-banners-with-news-images-discounts-in-magento2)\
Please Help.

## Replies

### Reply by Pravesh Singh

Hi Ashish,\
Try This:

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

Your url path plus your form name like ~/SomeFolder//Printticket.aspx


---

Original Source: https://www.mindstick.com/forum/1911/open-a-new-window-from-codebehind-c-sharp-with-window-open

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
