Dear Friend,
string[] computer_name = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName.Split(new Char[] { '.' });
String ecn = System.Environment.MachineName;
txtECN.Text = computer_name[0].ToString();
This link will do the thing for you:-
http://forums.asp.net/t/821809.aspx/1[
^]
Don't forget to mark this as your answer if it helps you out.
Thanks