Yeah, I actually ended up using:
Request.Url.Scheme + "://" + Request.Url.Host + ":" +
Request.Url.Port.ToString() + this.ResolveUrl("~/")
I'm trying to make my app portable between dev and production without having
to worry about the path. It's also being generated in a PDF, so I needed to
be able to have a fully qualified path for the link so it could be accessed
from the client directly.
Thanks
"Kevin Spencer" <un**********@nothinks.comwrote in message
news:ee*************@TK2MSFTNGP06.phx.gbl...
Assuming that the scheme is always going to be "http://" you don't need to
get that from the Request.
--
HTH,
Kevin Spencer
Microsoft MVP
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
"Nathan" <na*****@vinsolutions.comwrote in message
news:ec****************@TK2MSFTNGP02.phx.gbl...
>>I need to take a path "~/" and get a http://localhost:port/rootappfolder/
url out of it.
Currently I'm using:
Request.Url.Scheme + "://" + Request.Url.Host + this.ResolveUrl("~/");
//this is run from the context of a user control.
Is this the best way to do this by rebuilding the url from the client
request?
ideas?
Thanks in advance,
Nathan