Error in Required Field Validator

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SayamiSuchi
    New Member
    • Oct 2007
    • 16

    #1

    Error in Required Field Validator

    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# .
    Last edited by SayamiSuchi; Oct 2 '07, 11:07 AM. Reason: forgot to mention the platform i am using
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Hi SayamiSuchi,

    What is the exception error that you are getting?

    Comment

    • SayamiSuchi
      New Member
      • Oct 2007
      • 16

      #3
      Originally posted by Frinavale
      Hi SayamiSuchi,

      What is the exception error that you are getting?


      hi,
      Actually i am not getting any exception error....

      Comment

      • Shashi Sadasivan
        Recognized Expert Top Contributor
        • Aug 2007
        • 1435

        #4
        Originally posted by SayamiSuchi
        hi,
        Actually i am not getting any exception error....
        so programatically , the 2 validators are not validating something else either?

        try changing the message for the validators and fish out which message is being shown where.

        cheers

        Comment

        • SayamiSuchi
          New Member
          • Oct 2007
          • 16

          #5
          Originally posted by Shashi Sadasivan
          so programatically , the 2 validators are not validating something else either?

          try changing the message for the validators and fish out which message is being shown where.

          cheers

          Hello Shashi,
          Thanx for your suggestions...I tried it out but though i change the messages for the validators , it is not working...What has happened is that the corresponding message is shown but the previous problem is stable as before...no change....Any idea what to do ??? Hope to hear from you soon .....


          Regards,
          suchita

          Comment

          • Shashi Sadasivan
            Recognized Expert Top Contributor
            • Aug 2007
            • 1435

            #6
            Could you provide some code that you have done, and the current behaviour....an d if posssible the required behaviour too.

            cheers

            Comment

            • SayamiSuchi
              New Member
              • Oct 2007
              • 16

              #7
              Originally posted by Shashi Sadasivan
              Could you provide some code that you have done, and the current behaviour....an d if posssible the required behaviour too.

              cheers

              Thanx anyway, i solved it putting the Validation group name in both the required field validator and button ....Thanx you for trying to helping me....Thanx anyway....

              Comment

              Working...