Request.ServerVariables("SERVER_NAME")
will return the same thing as Request.Url.Host, but using Request.Url.Host
is prefered.
I'm not sure what you meant that you can't find SchemeDelimiter...here's the
documentation:
http://msdn.microsoft.com/library/de...mitertopic.asp
Request.Url is of type Uri.
You can simply use Request.Url.Host if you know it'll always be http:// and
just append http:// infront:
"http://" & Request.Url.Host
or you can use what I gave as an example if you want the entire thing
programmatically.
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Arjen" <bo*****@hotmail.com> wrote in message
news:cl*********@news4.zwoll1.ov.home.nl...
I found now also this one:
request.ServerVariables("SERVER_NAME")
Is this one not better?
Thanks
"Karl" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> schreef
in bericht news:ed**************@TK2MSFTNGP15.phx.gbl... There are a number of ways to get this,
Request.Url.Scheme & Request.Url.SchemeDelimiter & Request.Url.Host
is a good one...
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Arjen" <bo*****@hotmail.com> wrote in message
news:cl**********@news2.zwoll1.ov.home.nl... Hello,
How can I get the current host/domain name?
I my website is hosted at this http://www.mydomain.com or
http://mysub.mydomain.com/dir/ then I want to get this:
http://www.mydomain.com or (in sample 2) http://mysub.mydomain.com/
How can I realise that?
Thanks!