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 meaning of validateRequest=true in .net framework1.1?
The value of validateRequest is set to ’true’ by default, which means that the framework will automatically deny submission of the ’<’ and ’>’ characters.
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.
Is it possible to write code in many languages in one ASP.NET project
You cannot write the code-behind files in different languages in the same project, but you can write the aspx pages and ascx controls in different languages.
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 () );