txtbox data type

Results 1 to 2 of 2

Thread: txtbox data type

  1. #1
    Join Date
    Dec 1969

    Default txtbox data type

    I have a txtbox (called "estimated savings" - a monetary value)on an aspform that needs to write a value to a SQl db.I don't want people to be able to enter a comma or any alphabet letters into the txt, only a . (point) as the decimal value and only numeric values from 0 t0 9, eg 126.89 When I make the txtbox (client) a numeric field it still allows the comma, but takes it out when writing to the db, for ex 23,78 is written as 2378. What should I make the data type(I've tried decimal and integer)and how do I validate that there is not a comma or letters in the typed textbox before writing to the db ???? Thanks, your help will be much appreciated !

  2. #2
    Mr. Bigglesworth Guest

    Default RE: txtbox data type

    I, myself, and me, would use a regular expression, an "array" if you will...of values that you validate against in a given string.<BR><BR>You can find tons of articles on 4guys about RegExp&#039;s

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts