Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
i have design a html form for changing password.This form pop up when a link is clicked on asp.net page and the database is in sql-server 2008.how 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 />
                                        <center>
                                        <button class="submit button" type="button" style="height: 25px; width: 135px">Change Password</button>
                                        </center>
                                        </fieldset>
                                 </form>
                             </div>
Posted 26-Jun-13 2:17am
Edited 26-Jun-13 2:31am
v2
Comments
vipul.it08 at 26-Jun-13 7:23am
   
Please provide more input to resolve your problem.
Anuja Pawar Indore at 26-Jun-13 8:39am
   
Where is the logic to update password
diyapoornima at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi,
 
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.
 
Thanks
Vipul Patel
  Permalink  
Comments
diyapoornima at 26-Jun-13 7:36am
   
i need some c# or javascript coding for change password button
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi!...
 
If u want to update your password then you have to Run UPDATE Query in SQL...
 
like
 
Update Tablename Set Password=@PASSWORD Where column1=@column (for reference...)
 
......
  Permalink  
Comments
diyapoornima at 26-Jun-13 7:34am
   
i want this when user click on change password button
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

1. First of all attach a event for linkbutton to open the popup window
 
Example:
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
 
http://www.asp.net/web-forms/tutorials/security/admin/recovering-and-changing-passwords-cs[^]
 
http://msdn.microsoft.com/en-us/library/d90zte4w.aspx[^]
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 304
1 Maciej Los 285
2 Sergey Alexandrovich Kryukov 230
3 Shweta N Mishra 186
4 Aajmot Sk 153
0 OriginalGriff 7,660
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,760


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 26 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100