Solved

opening url in new browser...but url is along a different directory structure

Posted on 2009-05-11
1
191 Views
Last Modified: 2012-05-06
I have some code I can use to open a url in a different browser window

Response.Write("<SCRIPT language=javascript>var w=window.open('Report.aspx');</SCRIPT>");

But the aspx "report.aspx" is actually along a different directory path. Its a couple of levels lower and one level up the tree.

('~/Utils/Reports/Report.aspx');

but using that structure doesnt work in teh above example.

So anyone knwo HOw I can open the url with the diferent path like in teh above example.

I cant put in a static http: url because it changes depending on teh enviornment the app is installed in.
0
Comment
Question by:Prysson
1 Comment
 
LVL 12

Accepted Solution

by:
GuitarRich earned 500 total points
ID: 24356203
try this
Response.Write("<SCRIPT language=javascript>var w=window.open('" + ResolveUrl("~/Utils/Reports/Report.aspx") + ');</SCRIPT>");

Open in new window

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question