Connecting Tech Pros Worldwide Forums | Help | Site Map

adding textbox attribute...

Member
 
Join Date: Oct 2008
Posts: 42
#1: Nov 3 '08
can any one help me in adding type attribute to a textbox object???

here what i need is to add an attribute ie. alphanumeric,numeric,password etc....
ie a text box after adding this attribute should allow only alphanumeric values to be inserted... if the attribute added is alphanumeric..

markmcgookin's Avatar
Moderator
 
Join Date: Dec 2006
Location: Northern Ireland / England
Posts: 546
#2: Nov 3 '08

re: adding textbox attribute...


By changing the "PasswordChar" property of your textbox you can add a character you want to be displayed if this is a password box (It will assume it is for a password if you add something to this)

To the best of my knowledge you can't set alpha or alpha/num restrictions on the text box (I may be wrong)

You could manyally catch the ontextchanged event and check the text that has just been input and display an error if it's not what you wanted.
Reply