471,050 Members | 1,156 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,050 software developers and data experts.

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
2 1397
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.