.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Asp.net

Posted By: chandralal     Posted Date: November 25, 2010    Points:2   Category :C#
How to get IP list of a client machines in a network using Aspx or aspx.cs

Responses
Author: laptop charles             
Posted Date: December 04, 2010     Points: 5   

Try this code,


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace getIp_address
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
string hst = System.Net.Dns.GetHostName();

System.Net.IPHostEntry IPs = System.Net.Dns.GetHostByName(hst);



foreach (System.Net.IPAddress myip in IPs.AddressList)
{

textBox1.Text=myip.ToString();

}
}
}
}


Author: krishana singh             
Posted Date: December 07, 2010     Points: 5   

thanks......



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend