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. Problem with asp.net validators .net 2.0

Problem with asp.net validators .net 2.0

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasebeta-testinghelp
4 Posts 4 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.
  • C Offline
    C Offline
    ChrisFarrugia
    wrote on last edited by
    #1

    Dear all, I have an asp.net web page (feedback form) that has some validators implemented in order to ensure valid data. I also have a searh textbox and button in header of the page. My problem is that when I click the search button in the header, its click event is not triggered if there are some validation issues due to the validators. Is there a method by which I can only trigger the validators when clicking a particular button in the page and not on every button. Thanks a lot, Chris

    K V R 3 Replies Last reply
    0
    • C ChrisFarrugia

      Dear all, I have an asp.net web page (feedback form) that has some validators implemented in order to ensure valid data. I also have a searh textbox and button in header of the page. My problem is that when I click the search button in the header, its click event is not triggered if there are some validation issues due to the validators. Is there a method by which I can only trigger the validators when clicking a particular button in the page and not on every button. Thanks a lot, Chris

      K Offline
      K Offline
      Krazy Programmer
      wrote on last edited by
      #2

      validations work only when page is postback .. and every button which are using is a asp.net standard control .. so they all will generate post back .. So i suggest using javascript for validations ,, i might be wrong ,, experts will help you still for time being use javascript to do so

      If You win You need not Explain............ But If You Loose You Should not be there to Explain......

      1 Reply Last reply
      0
      • C ChrisFarrugia

        Dear all, I have an asp.net web page (feedback form) that has some validators implemented in order to ensure valid data. I also have a searh textbox and button in header of the page. My problem is that when I click the search button in the header, its click event is not triggered if there are some validation issues due to the validators. Is there a method by which I can only trigger the validators when clicking a particular button in the page and not on every button. Thanks a lot, Chris

        V Offline
        V Offline
        VivekNema
        wrote on last edited by
        #3

        You have to use validation Group property of the textbox, button and the validator. Put the common name(like Search group)to this property.So when you click search button then only this validator will work.

        1 Reply Last reply
        0
        • C ChrisFarrugia

          Dear all, I have an asp.net web page (feedback form) that has some validators implemented in order to ensure valid data. I also have a searh textbox and button in header of the page. My problem is that when I click the search button in the header, its click event is not triggered if there are some validation issues due to the validators. Is there a method by which I can only trigger the validators when clicking a particular button in the page and not on every button. Thanks a lot, Chris

          R Offline
          R Offline
          Ravi_21
          wrote on last edited by
          #4

          in the search button put this html code as a suggest below: CausesValidation="false" hope it will solve ur problem

          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