using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using System.Net;
public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        TextBox1.Text = Request.UserHostAddress;
        string hostName = Dns.GetHostName();
        TextBox3.Text = hostName;
        IPAddress[] ips;
        ips = Dns.GetHostAddresses(hostName);
        foreach (IPAddress ip in ips)
        {
            TextBox2.Text = ip.ToString();
        }
    }
}
