tags:

views:

76

answers:

2

how to convert textbox type to password in asp.net mvc

A: 

You mean <%=Html.Password("test")%> ?

Palantir
i want my textbox to show *** when i write in password field instead of plain text
Fraz Sundal
so yes, you should use the code above. Or, <input type="password" name="mypass">
Palantir
A: 

Either use the HTML helper function Password:

<%= Html.Password("Password") %>

or use the type parameter on an input field:

<input name="password" type="password" />

See listings 4 and 5 on this page

ChrisF