Obtain the Domain Name of the host on the current network by specifying an IP address.

Source: Internet
Author: User

Since the last century, my website has been updated much slowly. I don't know what kind of content do you want my website to provide?
As we have mentioned earlier, the IP address of the host is Dec through the network domain name.
With the continuous in-depth understanding of IPHostEntry Class, we can get the function of searching host domain names using IP addresses. With the constant mining of this function, I plan to make a complete
Programs pursued by the web version
Next we will use the program to learn this article.
<% @ Import NameSpace = "System. Net" %>
<Script language = "C #" runat = server>
Protected void doClick (Object Src, EventArgs E ){
IPHostEntry hostInfo = DNS. GetHostByAddr (txtIP. Text );
Showmsg. Text = hostInfo. Hostname;
}
</Script>
<Asp: Label runat = server id = showmsg/>
<Form id = testForm runat = server>
IP address: <asp: TextBox runat = server id = txtIP/> <asp: Button runat = server id = do Text = "" onClick = doClick/>
</Form>

In fact, this program is very simple. I just hope that when you read my article, you will not simply finish reading it! Conditional,
In this way, I hope you can improve your programming and learning abilities.
/*
Tofu is made of excellent products
Http://www.asp888.net bean curd technology station
If reprinted, Please retain the complete copyright information
*/


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.