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. FilteredTextBox for invalid chars as (@%$&*)

FilteredTextBox for invalid chars as (@%$&*)

Scheduled Pinned Locked Moved ASP.NET
tutorial
5 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.
  • S Offline
    S Offline
    satishjha
    wrote on last edited by
    #1

    how to filtered textbox i want to put only valid char suppose (a-z,0-9) please just send me the solution.

    B S D 3 Replies Last reply
    0
    • S satishjha

      how to filtered textbox i want to put only valid char suppose (a-z,0-9) please just send me the solution.

      B Offline
      B Offline
      Bardy85
      wrote on last edited by
      #2

      Try using a regex validator to check chars.

      1 Reply Last reply
      0
      • S satishjha

        how to filtered textbox i want to put only valid char suppose (a-z,0-9) please just send me the solution.

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

        Hello, U can assign a regularexpression validator to the text box. regularexpression can be "^[a-zA-Z0-9]$" try this.

        D 1 Reply Last reply
        0
        • S SunithaNallana

          Hello, U can assign a regularexpression validator to the text box. regularexpression can be "^[a-zA-Z0-9]$" try this.

          D Offline
          D Offline
          dipak dipak
          wrote on last edited by
          #4

          Hello, You can check on client side also. using textchanged event of that textbox. call a function on textchange and on the function check the keychar if it is within your range then text will be added otherwise it return false, means character not appended on that textbox. Only valid char will appears. Try to make a javascript function.. Best of luck. :-O

          Dipak

          1 Reply Last reply
          0
          • S satishjha

            how to filtered textbox i want to put only valid char suppose (a-z,0-9) please just send me the solution.

            D Offline
            D Offline
            dipak dipak
            wrote on last edited by
            #5

            Just check this link... I am saying this type of code.. http://www.w3schools.com/jsref/jsref\_onkeydown.asp Try it out.

            Dipak

            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