Asp.net Text Box Control With TextMode=Password

Hi
 
you can not use this syntex like
 
TextBox   TextBox1 ;
 
TextBox1.TextMode = Password ;
 
TextBox1.Text = "defaultPasswd"  ;
 
Asp.net does not allow you to Add default passwd like this
 
if you will do same you will see a blank text box.
 
So the solution is
 
TextBox1.Attributes.Add( "value" , "defaultPasswd" ) ;
 
This will work fine.
 
Thanks
 
Tarun Juneja

   

Advertisements

One thought on “Asp.net Text Box Control With TextMode=Password

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s