3
Answers

Check Format of DNS or IP

Ask a question
softairhk

softairhk

21y
2.5k
1
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)