Click here to Skip to main content
15,790,917 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i have design a html form for changing password.This form pop up when a link is clicked on page and the database is in sql-server can i update the password?

pls help me!!!!

This is my design for the form. I want that when user click on change password button the value of password change in the database.

<a href="#login-box-Change" popup-id="pop1" class="login-window" style="color:#558ED5">Change Password</a>
                           <div id="login-box-Change" class="login-popup">
                                <a href="#" class="close"><img src="image/close.jpg" width="20" height="20"  class="btn_close" title="Close Window" alt="Close" /></a>
                                  <form method="post" class="signin" action="#">
                                        <fieldset class="textbox">
                                        <label class="username">
                                        Old Password:
                                        <input id="oldp" name="oldp" value="" style="background-color:Gray; width=150px;"  type="text" autocomplete="on">
                                        </label><br /><br />
                                        <label class="username">
                                        New Password:
                                        <input id="newp" name="newp" value="" style="background-color:Gray; width=150px;"  type="text" autocomplete="on">
                                        </label><br /><br />
                                        <button class="submit button" type="button" style="height: 25px; width: 135px">Change Password</button>
Updated 26-Jun-13 2:31am
Vipul J Patel 26-Jun-13 7:23am    
Please provide more input to resolve your problem.
Anuja Pawar Indore 26-Jun-13 8:39am    
Where is the logic to update password
diyapoornima 1-Jul-13 1:48am    
in the code u can see the html button "change password". on its onclick event i have to call a function that can change the password in the database. but i do not know the logic for this function.i want help for it.


As per my understanding..

You need to fire sql queries to update password from sql database.

and you can set previous value of your password using below line of code.

txtpassword.attributes.add("Value", "password");

Let me know if you are satisfied with this or you want something else.

Vipul Patel
Share this answer
diyapoornima 26-Jun-13 7:36am    
i need some c# or javascript coding for change password button

If u want to update your password then you have to Run UPDATE Query in SQL...


Update Tablename Set Password=@PASSWORD Where column1=@column (for reference...)

Share this answer
diyapoornima 26-Jun-13 7:34am    
i want this when user click on change password button
1. First of all attach a event for linkbutton to open the popup window

link .Attributes.Add("onClick","javaScript:Openwindow()");

2. If any ask for hint question if valid call the Middle tier logic to update the Db table

You can refer the below link[^][^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900