Expand|Select|Wrap|Line Numbers
- private void txtDownloadRoot_Validating(object sender, CancelEventArgs e)
- {
- Regex driveCheck = new Regex(@"([a-zA-Z]:\\[^/:\*;\/\:\?<>\|]+)|(\\{2}[^/:\*;\/\:\?<>\|]+)");
- if (!driveCheck.IsMatch(txtDownloadRoot.Text))
- {
- e.Cancel = true;
- txtDownloadRoot.Focus();
- errorProvider1.SetError(txtDownloadRoot, "invalid path...!!!");
- }
- else
- {
- errorProvider1.SetError(this.txtDownloadRoot, String.Empty);
- }