Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-05-11
1
Medium Priority
?
195 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Integration Management Part 2
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

916 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