Control input value

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sasa Mihajlovic

    Control input value

    Hi,

    How can I control input value in editbox is it a valid number, without
    any char, special char or space before I use it in the application?

    I need this for windows mobile application, thank in advanced... :-Z


  • Peter Duniho

    #2
    Re: Control input value

    On Sun, 05 Oct 2008 07:49:27 -0700, Sasa Mihajlovic <office@msdinfo .com>
    wrote:
    Hi,
    >
    How can I control input value in editbox is it a valid number, without
    any char, special char or space before I use it in the application?
    >
    I need this for windows mobile application, thank in advanced... :-Z
    There is a Compact Framework newsgroup, so for CF questions you would
    probably be better off posting there, in general.

    As far as this specific question goes, in the regular .NET Framework, one
    possible approach would be to use the MaskedTextBox class, but it looks to
    me as though that's not supported on CF. So you'll have to validate the
    data yourself. You do this by subscribing to the Validating event and
    checking the data there. Don't forget to set the CausesValidatio n
    property to true.

    Pete

    Comment

    Working...