Check Format of DNS or IP
For the below coding, how to check the Host format, e.g. The Host is the DNS or IP, if the user inputted www.yahoo.com or 203.20.20.203, so it is correct, but if the user inputted aaa or 123, so it will prompt to input a correct DNS or IP format. Please give me reply asap. Thanks!
string sHost = txtHost.Text;
sHost.Trim();
if (sHost.Length == 0 )
{
MessageBox.Show("Please enter Host!","Warning",MessageBoxButtons.OK,MessageBoxIcon.Information);
txtHost.Focus();
return;
}
fm Softair

BenRank #7,080 · 249 reputationPosted Oct 6, 2003, 10:44 PM EDT
thed0ct0r84 reputationPosted Oct 14, 2003, 1:45 AM EDT
ms44cn4 reputationPosted Oct 16, 2003, 10:26 PM EDT