host name of site

J

John A Grandy

ASP.NET 2.0 IIS 5.5.

In code-behind , how to determine the host name of the site ?
 
K

Ken Cox [Microsoft MVP]

Hi Jhn,

Try this?

Response.Write(Request.ServerVariables("Server_Name"))


Ken
Microsoft MVP [ASP.NET]
 
J

John A Grandy

Is this the same thing ?

Request.Url.Host


Ken Cox said:
Hi Jhn,

Try this?

Response.Write(Request.ServerVariables("Server_Name"))


Ken
Microsoft MVP [ASP.NET]

John A Grandy said:
ASP.NET 2.0 IIS 5.5.

In code-behind , how to determine the host name of the site ?
 
K

Ken Cox [Microsoft MVP]

Hi John,

Yes, they're the same thing for the name of the server.

Ken
Microsoft MVP [ASP.NET]

John A Grandy said:
Is this the same thing ?

Request.Url.Host


Ken Cox said:
Hi Jhn,

Try this?

Response.Write(Request.ServerVariables("Server_Name"))


Ken
Microsoft MVP [ASP.NET]

John A Grandy said:
ASP.NET 2.0 IIS 5.5.

In code-behind , how to determine the host name of the site ?
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top