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" <> wrote in message
news:clhccf$f0$...
> 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:...
> > 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" <> wrote in message
> > news:clha1j$qkg$...
> > > 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!
> > >
> > >
> >
> >
>
>