Home > Articles > .Net Framework Articles > How to Show or Hide Password

How to Show or Hide Password

by vikash kumar   on Feb 16, 2016   Category: .Net Framework  | Level: Intermediate  |  Views: 1237    |  Points: 100   
Like this article? Bookmark and Share:
How to add show and Hide password feature on a Asp.Net web page Using Jquery

Put these codes inside Head section of the page.
        $(document).ready(function () {
            $("#chkShowHidePassword").click(function () {
                $("#txtPassword").attr('type', $(this).is(':checked') ? 'text' : 'password');

And Write these HTML Codes.
    <form id="form1" runat="server">
                    <td>User Id :
                    <td colspan="2">
                        <asp:TextBox ID="txtUserId" runat="server"></asp:TextBox>
                    <td>Password :
                        <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
                        <asp:CheckBox ID="chkShowHidePassword" runat="server" />Show password

And See the Result..... Happy coding..................

Like this article? Bookmark and Share:

Most viewed Articles

User Comments

  Re :How to Show or Hide Password   
Posted by Thamil
on 2/16/2016 6:59:01 AM
Points : 10

Hi vikash kumar, It's nice, thanks for the article. it would be better if you provide some more explanation so that beginners will understand easily.

Submit feedback about this article

Please sign in to post feedback

Latest Posts