"Mariame" <Ma************@yahoo.com> wrote in message
news:uv**************@TK2MSFTNGP12.phx.gbl...
i have a text box that is created Programmatically in a table & i want to
allow only numbers in this text box ?????????
Any ideas??????????
Do you mean that you want your page to fail validation at postback if there
are non-numeric characters in the textbox, or do you want to prevent your
users from physically typing in non-numeric characters?
Assuming the former, that's fairly easy with a validator and a regular
expression.
Assuming the latter, you'll have to create a client-side JavaScript function
called by the onmousedown() event of the textbox which disallows non-numeric
characters...