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

E

eguworks

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
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top