How to get the hostname or IP address of the server?

You can use either of these: HttpContext.Current.Server.MachineName HttpContext.Current.Request.ServerVariables[‘LOCAL_ADDR’] The first one should return the name of the machine, the second returns the local ip address. Note that name of the machine could be different than host, since your site could be using host headers

What is the different between <%# %> and <%= %>

The <%# %> is used for databinding where as <%= %> is used to output the result of an expression. The expression inside <%# %> will be executed only when you call the page’s or control’s DataBind method. The expression inside <%= %> will be executed and displayed as and when it appears in the page.

How to convert milliseconds into time

VB.NET dim ts as TimeSpan = TimeSpan.FromMilliseconds(10000) Response.Write (ts.ToString () ) C# TimeSpan ts = TimeSpan.FromMilliseconds(10000); Response.Write (ts.ToString () );