How to change TextBox Textmode to password in asp.net

1.File->New->Website->(left side select visual c#) ASP.NET Web Site->ok

2.Now You will see a Default.aspx page.
To create your own page->click on dropdown list below Edit->click Add new item->Select Web Form->click Add

3. Click Design->From ToolBox Drag and Drop a Label to Design window->Right click on label->select properties->(look for text property) change text property from label to "User Name".

4.Toolbox->drag and drop a TextBox to Design window(or Double click on Textbox) Beside label1.


5.Again Add a label and a TextBox following step 3 and 4->Name this label text to "Password"
(if you want add a button also)
Your Design should look like this.


6.Right click on TextBox2(TextBox Beside Password)->select properties->search for TextMode->change this from SingleLine to Password.

7.Click F5->ok
That is what we want



If you have any problem Regarding this article just leave a comment

No comments:

Post a Comment