Search
Winners

Win Prizes

Social Presence
Twitter Twitter LinkedIn YouTube Google

Like us on Facebook
Advertisements
Top Codes Author
Tue, 02-Sep-2014 Authors
Vishal@Neeraj
120
All Time Authors
Satyapriyanayak
12160
Jayakumars
8120
Niladri.biswas
6000

Latest members | More ...


(Statistics delayed by 5 minutes)
 Codes

How to validate password and confirm password using CompareValidator?

Poster
Posted by Poster under ASP.NET on 3/30/2009 12:30:28 AM | Views : 32157 | Status : [Member]

To validate password and confirm password using CompareValidator, use following code.


<asp:TextBox ID="txtPassword" runat="server" TextMode="Password" />
<asp:RequiredFieldValidator ID="req6" runat="server" ControlToValidate="txtPassword" Text="*" />
Confirm Password <asp:TextBox ID="txtPasswordC" runat="server" TextMode="Password" />
<asp:CompareValidator runat="server" ID="Comp1" ControlToValidate="txtPassword" ControlToCompare="txtPasswordC" Text="Password mismatch" />


Thanks


Found interesting? Add this to:



Comments or Responses


Login to post response