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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Textbox that allows only two digits after decimal point. and it doesn't allow any characters except digits

Textbox that allows only two digits after decimal point. and it doesn't allow any characters except digits

Scheduled Pinned Locked Moved C#
javascripttutorialquestion
2 Posts 2 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
    irkahc
    wrote on last edited by
    #1

    How to write a javascript code for a textbox that allows only digits and after decimal point it has to allow only two digits? Thanks, Hosanna

    J 1 Reply Last reply
    0
    • I irkahc

      How to write a javascript code for a textbox that allows only digits and after decimal point it has to allow only two digits? Thanks, Hosanna

      J Offline
      J Offline
      Jonathan van de Veen
      wrote on last edited by
      #2

      Wrong board! You're in the C# board not in the javascript board. To answer your question, you could simply use a change event where you can then check by using, for example a regular expression.

      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