Mobile:textbox question RRS feed

  • Question

  • User-1274894954 posted
    I am developing a mobile application that requires text entry in a mobile:textbox component. If I understand correctly the "numeric" parameter, when set to TRUE, on the textbox should limit it to numeric only input. I have set this parameter but when I input text on my cell phone, it still defaults to Alpha characters. I want it to only accept numeric. I.E.  when I press the "1" key on my cell phone it should enter a "1", not "a", "b", "c", etc. Any suggestions?
    Monday, September 18, 2006 6:59 PM

All replies

  • User1439985827 posted
    Put a RegularExpressionValidator on it.
    Tuesday, September 19, 2006 12:04 AM
  • User-1274894954 posted
    But unless I'm missing something that is only checked after the box is submitted. I need to force it to only accept numeric characters at input time, i.e. you shouldn't even be able to type anything other than 0-9.
    Wednesday, September 20, 2006 6:51 PM
  • User-1440242974 posted
    Use RangeValidator control it have a property type wich can be (string,integer,double,date) and has a range o values to set minium a mxim value i use this control to solve the problem you told upthere.
    Friday, September 29, 2006 5:01 PM
  • User-1179442337 posted

    hya im new to ASP.NET and not tried any mobile applications yet in ASP.NET, but im not so new to WML/WAP.

    have you tried using a regular WAP text input box in its place? like this->

    <% Response.Write "<input type='text' name='text1' format='NNNN'>" %>

    keep in mind, if you use that format, the "N" in the format part, you need to put in as many "N" as many as numbers there are. example: if you need 6 numbers input, then use 6 "N"`s -> format = "NNNNNN"

    im not sure if you can code that way in the ASP.NET mobile part yet, or if that helps but let me know.

    Friday, September 29, 2006 5:20 PM