Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

validation for characters in vb.net

aswinanuaswinanu Posts: 13Member
hi :


1) how to assign only character for text box
2) how to assign numbers for textbox

Comments

  • DrMartenDrMarten Posts: 748Member
    [b][red]This message was edited by DrMarten at 2007-1-3 11:59:23[/red][/b][hr]
    : hi :
    :
    :
    : 1) how to assign only character for text box
    : 2) how to assign numbers for textbox
    ______________________________________________________________________

    Hi,

    2) >>

    [code]
    If IsNumeric(textbox1.text) = True THEN 'Input is a number

    ' Some code here.

    Else

    MsgBox("Please input a number only in this textbox.")

    EndIf

    [/code]

    Try the MSDN library for help with commands first.
    >> http://msdn.microsoft.com/library/

    Put a dot after a control name and some things become obvious.


    Regards,

    Dr M.


    P.S. How about using the word "please" occasionally when asking for
    help with code?

Sign In or Register to comment.