Thanks Juan
Shimon.
"Juan T. Llibre" <> wrote in message news:uO2ACTP%...
You can also use Request.Url.Host
<%@ Page Language="VB" %>
<script language="VB" runat="server">
Sub Page_Load(ByVal obj As Object, ByVal e As EventArgs)
Dim dnsname As String = Request.Url.Host
Label1.Text = dnsname
End Sub
</script>
<head>
<title>Retrieve Server DNS Name</title>
</head>
<html>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" Runat="server" Text="Label" Width="238px" Height="19px"></asp:Label><br />
</div>
</form>
</body>
</html>
Juan T. Llibre
ASP.NET MVP
===========
"Shimon Sim" <> wrote in message news:eggRj6O%...
> Hi
> I need to get application address that will look like this
> http://www.mysite.com
> I tried already Request.FilePaht that the documentation says that it returns
> the full path of the request including host name but on my machine for some
> reason it only returns virtual path and is equal RawUrl.
>
> What's wrong? How can I get host name programmatically?
> Shimon
>
>