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 can i validate multiple textbox

how can i validate multiple textbox

Scheduled Pinned Locked Moved ASP.NET
questionsysadmin
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.
  • N Offline
    N Offline
    neodeaths
    wrote on last edited by
    #1

    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="TextBox1" <>> hi the above code validate 1 textbox izzit possible to let it validate multiple textbox with 1 validator?

    L M 2 Replies Last reply
    0
    • N neodeaths

      <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="TextBox1" <>> hi the above code validate 1 textbox izzit possible to let it validate multiple textbox with 1 validator?

      L Offline
      L Offline
      lavanya_satheesh
      wrote on last edited by
      #2

      Dont think it is possible. U need to use different validation controls for different text boxes.

      1 Reply Last reply
      0
      • N neodeaths

        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="TextBox1" <>> hi the above code validate 1 textbox izzit possible to let it validate multiple textbox with 1 validator?

        M Offline
        M Offline
        marky777
        wrote on last edited by
        #3

        I think you need to loop thru each textbox and assign the validator to it. Or you could create validators for each textbox.

        S 1 Reply Last reply
        0
        • M marky777

          I think you need to loop thru each textbox and assign the validator to it. Or you could create validators for each textbox.

          S Offline
          S Offline
          sim099
          wrote on last edited by
          #4

          marky777 wrote:

          I think you need to loop thru each textbox and assign the validator to it.

          Surely this would simply update the "ControlToValidate" property multiple times and still end up verifying only a single textbox?

          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