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. validation

validation

Scheduled Pinned Locked Moved ASP.NET
helpquestion
3 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.
  • T Offline
    T Offline
    test 09
    wrote on last edited by
    #1

    im having 4 textboxs in repeater if all the text boxes are empty validation is disabled and if the 1st text box is empty and any of other text boxs are filled then error msg should display... how can i do that...

    P T 2 Replies Last reply
    0
    • T test 09

      im having 4 textboxs in repeater if all the text boxes are empty validation is disabled and if the 1st text box is empty and any of other text boxs are filled then error msg should display... how can i do that...

      P Offline
      P Offline
      PSK_
      wrote on last edited by
      #2

      It doesn’t seem to be possible with the available validation control we are having in ASP.NET. You can do this as following. Client Side: On the form submit/ or submit button click call a javascript function and check the value of each textboxes.

      <form onsubmit="return Validate();" method="post">

      And check the values of all the textboxex, if the validation passes then return true so that form can post otherwise show an error message. Server Side: Loop through the repeater and find each textbox control and check the validation.

      WWW, WCF, WWF, WPF, WFC .... WTF

      1 Reply Last reply
      0
      • T test 09

        im having 4 textboxs in repeater if all the text boxes are empty validation is disabled and if the 1st text box is empty and any of other text boxs are filled then error msg should display... how can i do that...

        T Offline
        T Offline
        T M Gray
        wrote on last edited by
        #3

        The very first result of a google search for enable client side validator javascript How to control ASP.NET Validator Controls Client Side validation from JavaScript[^]

        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