Mapping a Url Using ~

G

Guest

I need to generate client-side JavaScript from server-side ASPX. I have no
trouble doing that but in the JavaScript I generate, I need to refer to a Url
of another page on the site when doing JavaScript that pops a window
(window.open()).

In the server side code, I want to be able to convert a Url which contains a
"~" into a Url which I can then insert into the client-side JavaScript. What
function can I use to dynamically convert a path which contains a "~" into a
path that can be used from the client? This must be possible because it's
what controls like the server-side IMG tag use for their Src property.

Thanks.
 
B

Brock Allen

Control.ResolveClientUrl (also Page.ResolveClientUrl) is the helper API in
2.0 for this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top