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. How to Disable Validation Events?

How to Disable Validation Events?

Scheduled Pinned Locked Moved ASP.NET
questionhelptutorial
4 Posts 3 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.
  • I Offline
    I Offline
    innocent73
    wrote on last edited by
    #1

    Hello Friends, I have a webform. There are 11 "RequiredFieldValidator" controls on this web form. If something goes wrong then validation controls warn me. That's ok. There is another button on this webform that navigates to another webform.When I click this button validation controls dont allow me to navigate. But suppose that I will do nothing on this page and I will navigate another page..How can I disable the effect of these validationcontrols when I click the button. Please Help..

    T D 2 Replies Last reply
    0
    • I innocent73

      Hello Friends, I have a webform. There are 11 "RequiredFieldValidator" controls on this web form. If something goes wrong then validation controls warn me. That's ok. There is another button on this webform that navigates to another webform.When I click this button validation controls dont allow me to navigate. But suppose that I will do nothing on this page and I will navigate another page..How can I disable the effect of these validationcontrols when I click the button. Please Help..

      T Offline
      T Offline
      Tirthadip
      wrote on last edited by
      #2

      Hi innocent73, just make the "CausesValidation" property of that Button(for which you dont want the validation to be executed)to "False". Tirthadip

      I 1 Reply Last reply
      0
      • T Tirthadip

        Hi innocent73, just make the "CausesValidation" property of that Button(for which you dont want the validation to be executed)to "False". Tirthadip

        I Offline
        I Offline
        innocent73
        wrote on last edited by
        #3

        Thank you so much....That's the answer!!

        1 Reply Last reply
        0
        • I innocent73

          Hello Friends, I have a webform. There are 11 "RequiredFieldValidator" controls on this web form. If something goes wrong then validation controls warn me. That's ok. There is another button on this webform that navigates to another webform.When I click this button validation controls dont allow me to navigate. But suppose that I will do nothing on this page and I will navigate another page..How can I disable the effect of these validationcontrols when I click the button. Please Help..

          D Offline
          D Offline
          Dipan Patel From Gandhinagar
          wrote on last edited by
          #4

          Good Question. I just face this problem and find the solution. So i glad to help to anybody. see , when u create the requirefieldvalidatio at design time... set the property of it "EANBLED=FALSE" so when u want to enable it then write the code for it like "requirefieldvalidator1.Enabled=True" and when u want to disable it then set the property "False" i will give one more example there is two button. like " save " and "cancle" so u want "cancle" button cant fire the requirefieldvalidator then set the property of "cancle" like "causevalidation=False" it will work 100% so enjoy.. :) Dipan Patel.

          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