Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Compare Password and Confirm Password

Posted on 2006-03-22
4
Medium Priority
?
316 Views
Last Modified: 2010-05-18
How can I make sure that password and confirm password match?

<tr>

<td width="140" align="right">
<font color="#ff0000">*</font> <font class="formtext">Password:</font>
</td>

<td width="10">&nbsp;</td>
<td>
<asp:TextBox runat="server" id="password" Columns="18"></asp:TextBox>
</td>

<td width="15">
&nbsp;
</td>

<td width="185" align="right">
<font color="#ff0000">*</font> <font class="formtext">Confirm Password:</font>
</td>

<td width="10">&nbsp;</td>

<td>
<asp:TextBox runat="server" id="confirmpw" Columns="18"></asp:TextBox>
</td>

</tr>
0
Comment
Question by:net_susan
4 Comments
 
LVL 15

Assisted Solution

by:GavinMannion
GavinMannion earned 400 total points
ID: 16257066
In the onlick button

C#
if( password.Text == confirmpx.Text) //The passwords match

VB
If password.Text = confirmpx.Text Then 'Passwords match

0
 
LVL 11

Assisted Solution

by:Ramesh Srinivas
Ramesh Srinivas earned 400 total points
ID: 16257069
Why? does this not work??

On your buttonclick event:

If password.text = confirmpw.text Then
  ... do whatever..
End if
0
 
LVL 4

Accepted Solution

by:
avanishp earned 1200 total points
ID: 16257204
Hello

you can use comparevalidator:

<asp:comparevalidator id="valCmpResgistrationtxtCnfPass" Runat="server" CssClass="text" ErrorMessage="Both password should be same." ControlToValidate="password"  controlToCompare="confirmpx"></asp:comparevalidator>



Avanish
0
 
LVL 1

Author Comment

by:net_susan
ID: 16257426
Thank you!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month10 days, 16 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question