Hi,
I have a CustomValidator control that checks if the directory path a user enters actually exists. Functions correctly on my web servers browser but if I access the site on a different machine then the validation always fails. Any ideas on why this is occurring?
Heres the function:
Private Sub BuildLocationValidator_ServerValidate(ByVal source As System.Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles BuildLocationValidator.ServerValidate
If Not (Directory.Exists(txtBuildLocation.Text)) Then
BuildLocationValidator.IsValid = False
args.IsValid = False
lbFailedUpload.Visible = True
lbFailedUpload.Text = "Build Location is Invalid."
Else
BuildLocationValidator.IsValid = True
args.IsValid = True
End If
End Sub
Peter
I have a CustomValidator control that checks if the directory path a user enters actually exists. Functions correctly on my web servers browser but if I access the site on a different machine then the validation always fails. Any ideas on why this is occurring?
Heres the function:
Private Sub BuildLocationValidator_ServerValidate(ByVal source As System.Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles BuildLocationValidator.ServerValidate
If Not (Directory.Exists(txtBuildLocation.Text)) Then
BuildLocationValidator.IsValid = False
args.IsValid = False
lbFailedUpload.Visible = True
lbFailedUpload.Text = "Build Location is Invalid."
Else
BuildLocationValidator.IsValid = True
args.IsValid = True
End If
End Sub
Peter