467,885 Members | 1,202 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,885 developers. It's quick & easy.

How to return the full virtual path if I pass the url as "~/default.aspx"?

ABC
How to return the full virtual path if I pass the url as "~/default.aspx"?

I expected this should result as http://aaa.bbb.com/default.aspx.
Mar 27 '06 #1
  • viewed: 1317
Share:
2 Replies
Hello ABC,

asuming you want to have the requested url in your code,
I found that using either:

Response.Write(Request.RawUrl.ToString)
gives (in my case) /wsNET/testform.aspx

and

Response.Write(Request.Url.ToString)
gives (also in my case) http://localhost:1124/wsNET/testform.aspx

Notice the difference in the request.url and the request.rawurl

ofcourse you can also dim a pair of strings receiving the url text.

Egu

Mar 27 '06 #2
ABC wrote:
How to return the full virtual path if I pass the url as
"~/default.aspx"?
I expected this should result as http://aaa.bbb.com/default.aspx.


Something like:

Request.Url.Host + ResolveUrl(url)

--

Riki
Mar 27 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by cppaddict | last post: by
5 posts views Thread by Francesc | last post: by
5 posts views Thread by .rhavin grobert | last post: by
reply views Thread by =?Utf-8?B?bXVzb3NkZXY=?= | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.