softairhk

softairhk

  • NA
  • 115
  • 0

Check Format of DNS or IP

Oct 7 2003 1:25 AM
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

Answers (3)