Show password option for the Password field can be
obtained by placing the checkbox and using some piece of JavaScript code to obtain
this functionality. This can be done in onchange or onclick events of the
checkbox. Find the example below.
ASPX code: Using onchange Event
<html>
<head runat="server">
<title>Show password checkbox</title>
</head>
<body>
<form id="form1" runat="server">
<div><br />
<asp:Label ID="Label1" runat="server" Text="User name:">
</asp:Label><asp:TextBox ID="Uname" runat="server"></asp:TextBox>
<br />
<asp:Label ID="Label2" runat="server" Text="Password
:"></asp:Label>
<asp:TextBox TextMode="Password" ID="password" runat="server"></asp:TextBox>
<input type="checkbox" onchange="document.getElementById('password').type =
this.checked ? 'text' : 'password'">
Show password
</div>
</form>
</body>
</html>
[OR]
ASPX code: Using onclick Event
<html>
<head runat="server">
<title>Show password checkbox : fourthbottle</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Password :
<input type="password" name="password" id="password" />
<input type="checkbox" id="pass" onclick="showpass(this);" />
Show Password
<script type="text/javascript">
function showpass(check_box) {
var spass =
document.getElementById("password");
if (check_box.checked)
spass.setAttribute("type", "text");
else
spass.setAttribute("type", "password");
}
</script>
</div>
</form>
</body>
</html>
-Anantha Bharani Guhan
19 Comments
ReplyDeleteI have to agree with everything in this post. Thanks for the useful information.
Struts Training in Chennai
Struts Training
Wordpress Training in Chennai
Wordpress Training institute in Chennai
Wordpress Training in T Nagar
Wordpress Training in Tambaram
Struts Training in Chennai
Struts Training
Nice blog....waiting for next update....
ReplyDeleteStruts Training in Chennai
Struts Training center in Chennai
Struts course in Chennai
Struts Training in Velachery
Struts Training in Tambaram
Wordpress Training in Chennai
SAS Training in Chennai
Spring Training in Chennai
Photoshop Classes in Chennai
DOT NET Training in Chennai
Wonderful Blog!!! Waiting for your upcoming data... thanks for sharing with us.
ReplyDeleteSoftware Testing Training in Chennai
software testing course in chennai
software testing course
software testing training institute in chennai
Software testing training in Velachery
Software testing training in Adyar
Python Training in Chennai
Digital marketing course in chennai
JAVA Training in Chennai
awesome article,the content has very informative ideas, waiting for the next update...
ReplyDeleteC C++ Training in Chennai
C++ Training
C Language Training
C C++ training in T nagar
C C++ training in Vadapalani
javascript training in chennai
core java training in chennai
Html5 Training in Chennai
DOT NET Training in Chennai
QTP Training in Chennai
This comment has been removed by the author.
ReplyDeleteOn this site https://soclikes.com/ I buy tiktok followers every month
ReplyDeleteIncredibly conventional blog and articles. I am realy very happy to visit your blog. Directly I am found which I truly need. Thankful to you and keeping it together for your new post.
ReplyDelete360DigiTMG masters in data science
Through this post, I realize that your great information in playing with all the pieces was exceptionally useful. I advise this is the primary spot where I discover issues I've been scanning for. You have a smart yet alluring method of composing.
ReplyDeletehttps://360digitmg.com/course/certification-program-in-data-science
Stunning! Such an astonishing and supportive post this is. I incredibly love it. It's so acceptable thus wonderful. I am simply astounded.
ReplyDeletehttps://360digitmg.com/course/certification-program-in-data-science
Good to become visiting your weblog again, it has been months for me. Nicely this article that i've been waited for so long. I will need this post to total my assignment in the college, and it has exact same topic together with your write-up. Thanks, good share.
ReplyDeletedata science course in India
It is good article, if you make youtube video, buy youtube likes from here https://viplikes.in
ReplyDeleteI just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!
ReplyDeleteArtificial Intelligence Course
I wish more writers of such a substance would take the time you did to examine and shape so well. I am especially awed with your vision and data.
ReplyDeletemachine learning masters
I would like to thank you for getting my neurons conspicuous with this brilliant article that you have written which contains every potential points which needs to considered on the given topic. Thanks for chipping in such a brilliant writing!
ReplyDeleteData Science training in Mumbai
Data Science course in Mumbai
SAP training in Mumbai
After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article. wowway speed test
ReplyDeleteThrough this post, I realize that your great information in playing with all the pieces was exceptionally useful. I advise this is the primary spot where I discover issues I've been scanning for. You have a smart yet alluring method of composing.
ReplyDeletehttps://360digitmg.com/course/certification-program-in-data-science
This information is really great. Thanks for sharing this article thank you..
ReplyDeleteroles and responsibilities of devops engineer
7 habits of highly effective people
mobile application testing tools
importance of website development
microsoft excel interview questions
Great tips and very easy to understand. This will definitely be very useful for me when I get a chance to start my blog.
ReplyDeleteBest Institute for Data Science in Hyderabad
Mua vé máy bay tại đại lý Aivivu, tham khảo
ReplyDeletevé máy bay đi Mỹ tháng nào rẻ nhất
vé máy bay từ mỹ về việt nam giá rẻ
ve may bay tư duc ve viet nam
vé máy bay từ nga về việt nam