Author: meetjaydeep | Posted on: 11/27/2009 3:59:39 AM | Views : 308

I want to upload txt files.
For this I have placed CustomValidator which checks the extension of the file.
But, with tamperdata plugin if i change the file name of the upload file CustomValidator's ServerValidate event will not execute.
Please help me on this issue.

private void CustomValidator1_ServerValidate(object source, System.Web.UI.WebControls.ServerValidateEventArgs args)
{
string UploadFileName = FileUpload.PostedFile.FileName;

if(UploadFileName == "")
{
// There is no file selected
args.IsValid = false;
}
e ...

Go to the complete details ...