windows - VB.NET No Such host is known IP Grabber -


my program grabs ip of specific subdomains of host. if 1 of them don't exist gives error saying: no such host known. how can make replace text in lbldirect "not found" instead of give error.

dim dhostname iphostentry = dns.gethostentry("direct." + textbox1.text) dim dip ipaddress() = dhostname.addresslist lbldirect.text = dip(0).tostring 

is code i'm using grabbing ip.

use try...catch handle error , set label value in catch section.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -