hi,
I have taken two file upload control (fileUpload1 and fileUpload2) and two required field validator(requi redFieldValidat or1 and requiredFieldVa lidator2) for the two upload controls mentioned above.i.e requiredFieldVa lidator1 for fileUpload1 and requiredFieldVa lidator2 for fileUpload2.Now there are two button btnUpload1 and btnUpload2 for two controls.i.e btnUpload1 is for uploading file of name given to fileUpload1 control and btnUpload2 is for uploading file of the name given to fileUpload2.Now what is happening is that when i gave valid file name in fileUpload1 and clicked btnUpload1, it also checks for fileUpload2 and depending on its container, it is throwing exceptions.Like if fileUpload2 has file name given, no error but when there is no file name given in fileUpload2, it is giving error.However, the requiredFieldVa lidator1 shouldn't check for fileUpload2.The control to validate for requiredFieldVa lidator1 is fileUpload1 and for requiredFieldVa lidator2 is fileUpload2. And the same error comes when i try to upload the file of fileUpload2 and click btnUpload2.Why this error is coming ...How to solve this ...Well i am using ASP DOT NET 2005 using C# .
I have taken two file upload control (fileUpload1 and fileUpload2) and two required field validator(requi redFieldValidat or1 and requiredFieldVa lidator2) for the two upload controls mentioned above.i.e requiredFieldVa lidator1 for fileUpload1 and requiredFieldVa lidator2 for fileUpload2.Now there are two button btnUpload1 and btnUpload2 for two controls.i.e btnUpload1 is for uploading file of name given to fileUpload1 control and btnUpload2 is for uploading file of the name given to fileUpload2.Now what is happening is that when i gave valid file name in fileUpload1 and clicked btnUpload1, it also checks for fileUpload2 and depending on its container, it is throwing exceptions.Like if fileUpload2 has file name given, no error but when there is no file name given in fileUpload2, it is giving error.However, the requiredFieldVa lidator1 shouldn't check for fileUpload2.The control to validate for requiredFieldVa lidator1 is fileUpload1 and for requiredFieldVa lidator2 is fileUpload2. And the same error comes when i try to upload the file of fileUpload2 and click btnUpload2.Why this error is coming ...How to solve this ...Well i am using ASP DOT NET 2005 using C# .
Comment