Home >

c# DnsControl

12. December 2009

Read this article in your language IT | EN | DE | ES

Bu örnek dersimizde c# bir sitenin dns adresini nasıl  gösteriz onu  görelim

sadece   form bir adet button bir adet textbox bir adet listbox control ekliyoruz 

 

örnek projenin çıktısı :

 

kodumuz 

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;
using System.Net;

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

        string dnscontrol;
        private void buttonX1_Click(object sender, EventArgs e)
        {

            dnscontrol = textBoxX1.Text;

            IPAddress[] addresslist = Dns.GetHostAddresses(textBoxX1.Text);

            foreach (IPAddress theaddress in addresslist)
            {
                listBox1.Items.Clear();
                listBox1.Items.Add(theaddress.ToString());
                textBoxX1.Text = "";
                textBoxX1.Focus();
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            textBoxX1.Focus();
        }
    }
}


Saygılarımla Orhan Türk Yen ibir örnek projede görüşmek üzere herkeze iyi calişmalar 

FacebookDigg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Comments

4/13/2010 8:11:54 AM #
Great work pal, keep it up. Hello, I found this blog some time ago, then misplaced it. Took me forever to return and find it.
5/9/2010 9:25:15 AM #
Have you ever considered adding up more videos about c# dns control to your weblog posts to keep the readers further entertained? I mean I just read through the entire piece of yours and it had been extremely enjoyable but since I'm more of a visual learner,I found that for being extra helpful well let me know how it turns out! I love what you guys are always up too. Such bright work and reporting! Carry on the great works guys I've added you guys to my blogroll. This is a good article thanks for sharing this informative information.. I will visit your blog regularly for some latest post.

Add comment


(Will show your Gravatar icon)

biuquote
  • Comment
  • Preview
Loading



Sayfa 0 saniyede yuklendi.