ms.tery
ms.tery

Reputation: 149

how to make a displayformat (*) in textbox in asp.net

i wanted to make a Login page, but i dont know how to make a displayformat in password textbox. I want to display (*) whenever i started to type in the password textbox in ASP.NET .

here is my code:

<form method="post" action="" runat="server">
    <p><asp:TextBox id="txtUser" runat="server" placeholder="Username"/></p>
    <p><asp:TextBox id="txtPass" runat="server" placeholder="Password"/></p>
    <p class = "remember_me">
    <label>
    <label>
    <input type = "checkbox" name = "remember_me" id = "remember_me" runat="server">
    Remember me on this computer
    </label>
    </label>
    </p>
    <p class="submit"><asp:Button id="btnLogin" Text="Login" runat="server" OnClick="submit" /></p>
</form>

Upvotes: 0

Views: 207

Answers (1)

ANewGuyInTown
ANewGuyInTown

Reputation: 6437

Use input type password for html. e.g.

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

For ASP.NET

<asp:TextBox ID="txtBox1" TextMode="Password" runat="server" />

Upvotes: 2

Related Questions