Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. RequiredFieldValidator Posting Back!!!?

RequiredFieldValidator Posting Back!!!?

Scheduled Pinned Locked Moved ASP.NET
helpsysadminquestion
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SIJUTHOMASP
    wrote on last edited by
    #1

    Hai, I have used asp:RequiredFieldValidator to validate two text boxes. But when I clicks on the button it is posting back and executing the server code with the required field validator error message. i have set the clientside validation property true for the button and my requiredfieldvalidator code is Please select a DPM or Table from Module1Why this happened? Any idea? Please help me to resolve this by showing a right way. Thanks very much. Thank you, Rahul.P.Menon. -- modified at 0:31 Tuesday 13th December, 2005

    A 1 Reply Last reply
    0
    • S SIJUTHOMASP

      Hai, I have used asp:RequiredFieldValidator to validate two text boxes. But when I clicks on the button it is posting back and executing the server code with the required field validator error message. i have set the clientside validation property true for the button and my requiredfieldvalidator code is Please select a DPM or Table from Module1Why this happened? Any idea? Please help me to resolve this by showing a right way. Thanks very much. Thank you, Rahul.P.Menon. -- modified at 0:31 Tuesday 13th December, 2005

      A Offline
      A Offline
      AfzalHassen
      wrote on last edited by
      #2

      Rahul.P.Menon wrote:

      i have set the clientside validation property true for the button

      Hi, have you set the ValidationGroup property of the asp:RequiredFieldValidator and the asp:Button ? if not set the property to ValidationGroup = myValidationGroupName for both the button and the validator controls. In addition, you might want to make sure that the property CausesValidation of the button is set to true Hopes this helps :) let me know how it goes... Afzal "AV-E" Hassen

      S 1 Reply Last reply
      0
      • A AfzalHassen

        Rahul.P.Menon wrote:

        i have set the clientside validation property true for the button

        Hi, have you set the ValidationGroup property of the asp:RequiredFieldValidator and the asp:Button ? if not set the property to ValidationGroup = myValidationGroupName for both the button and the validator controls. In addition, you might want to make sure that the property CausesValidation of the button is set to true Hopes this helps :) let me know how it goes... Afzal "AV-E" Hassen

        S Offline
        S Offline
        SIJUTHOMASP
        wrote on last edited by
        #3

        Hai Afzal, Thanks much for your help and quick response. But I couldn't get the specified property 'ValidationGroup' for requiredfield validator or button.Can you please elaborate the point.I have set the causesvalidation=true.Still it is posting back.Please show me the right way. Thanks very much. Thank You, Rahul.P.Menon

        A 1 Reply Last reply
        0
        • S SIJUTHOMASP

          Hai Afzal, Thanks much for your help and quick response. But I couldn't get the specified property 'ValidationGroup' for requiredfield validator or button.Can you please elaborate the point.I have set the causesvalidation=true.Still it is posting back.Please show me the right way. Thanks very much. Thank You, Rahul.P.Menon

          A Offline
          A Offline
          AfzalHassen
          wrote on last edited by
          #4

          hey Rahul, No problem, look carefully in the property explorer of the IDE (the pane where you set the ID of your control).. make sure that you select the asp:RequiredFieldValidator control in the designer for your page the property pane will show the available properties for the asp:RequiredFieldValidator you just selected.. the property ValidationGroup is definitley there :) do the same for the asp:Button control. let me know if i need to elaborate a little more.. :) Afzal "AV-E" Hassen

          S 1 Reply Last reply
          0
          • A AfzalHassen

            hey Rahul, No problem, look carefully in the property explorer of the IDE (the pane where you set the ID of your control).. make sure that you select the asp:RequiredFieldValidator control in the designer for your page the property pane will show the available properties for the asp:RequiredFieldValidator you just selected.. the property ValidationGroup is definitley there :) do the same for the asp:Button control. let me know if i need to elaborate a little more.. :) Afzal "AV-E" Hassen

            S Offline
            S Offline
            SIJUTHOMASP
            wrote on last edited by
            #5

            Hai Afzal, I am using the previous version 1.1 of dotnetframewor.(That is not version 2 of dotnetframework).I think the specified property 'ValidationGroup' is new and only available in version2. So that i couldnot get the property. What I should do? Still it is posting back and made me confused. Thanks a lot for your valuable information. Thank You, Rahul.P.Menon

            A 1 Reply Last reply
            0
            • S SIJUTHOMASP

              Hai Afzal, I am using the previous version 1.1 of dotnetframewor.(That is not version 2 of dotnetframework).I think the specified property 'ValidationGroup' is new and only available in version2. So that i couldnot get the property. What I should do? Still it is posting back and made me confused. Thanks a lot for your valuable information. Thank You, Rahul.P.Menon

              A Offline
              A Offline
              AfzalHassen
              wrote on last edited by
              #6

              hey, My bad:doh:, I should have known to ask what version of ASP.NET you're using to develop with. You are correct, 1.1 does not have the validation group property, however, I wrote a quick test webform to see what properties need to be set in 1.1 .. and I found that the control did perform the intended validation on the Textbox i used. The only properties I set were... for the RequiredFieldValidator: ControlToValidate = myTextbox , Display = Dynamic; for the button i set CausesValidation = true and that was it. As soon as i selected to view the page in a browser, it worked perfectly. if this still doesnt help, then i would be just as stumped as you are..:sigh: Afzal "AV-E" Hassen

              S 1 Reply Last reply
              0
              • A AfzalHassen

                hey, My bad:doh:, I should have known to ask what version of ASP.NET you're using to develop with. You are correct, 1.1 does not have the validation group property, however, I wrote a quick test webform to see what properties need to be set in 1.1 .. and I found that the control did perform the intended validation on the Textbox i used. The only properties I set were... for the RequiredFieldValidator: ControlToValidate = myTextbox , Display = Dynamic; for the button i set CausesValidation = true and that was it. As soon as i selected to view the page in a browser, it worked perfectly. if this still doesnt help, then i would be just as stumped as you are..:sigh: Afzal "AV-E" Hassen

                S Offline
                S Offline
                SIJUTHOMASP
                wrote on last edited by
                #7

                Hai Afzal, Thanks a lot for your help. But this time bad luck for me. I have tried all these ways,but it is still posting back:confused: Prevoiusly I have used javascript for the validation.Later I changed with requiredfieldvalidator.So that my aspx page contains javascript functions.Is this cause any problem..? Any way I am still in search how to resolve...?:omg: Thanks very much. Thank You, Rahul.P.Menon. SoftwareDeveloper(.NET)

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups