Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. problem in changing password

problem in changing password

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-net
9 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bunny varun
    wrote on last edited by
    #1

    Hi i am working in asp.net using vb.net and unable to change the password for a user i have 3 fields old password, new password and confirm password please help. Thankyou

    M B S C 4 Replies Last reply
    0
    • B bunny varun

      Hi i am working in asp.net using vb.net and unable to change the password for a user i have 3 fields old password, new password and confirm password please help. Thankyou

      M Offline
      M Offline
      Muhammad Gouda
      wrote on last edited by
      #2

      You need to be more specific What is exactly your problem

      Mohamed Gouda Egypt

      B 1 Reply Last reply
      0
      • M Muhammad Gouda

        You need to be more specific What is exactly your problem

        Mohamed Gouda Egypt

        B Offline
        B Offline
        bunny varun
        wrote on last edited by
        #3

        i need to know the code for changing the password for a user using vb.net

        V 1 Reply Last reply
        0
        • B bunny varun

          Hi i am working in asp.net using vb.net and unable to change the password for a user i have 3 fields old password, new password and confirm password please help. Thankyou

          B Offline
          B Offline
          Blue_Boy
          wrote on last edited by
          #4

          Set one compare validator and link it with new password controls(Textboxes),on click event of button set code which lookup on database for old given password if query match then update old password to new given password.


          I Love SQL

          1 Reply Last reply
          0
          • B bunny varun

            Hi i am working in asp.net using vb.net and unable to change the password for a user i have 3 fields old password, new password and confirm password please help. Thankyou

            S Offline
            S Offline
            sumit7034
            wrote on last edited by
            #5

            add this code on button click dim cmd as new SqlCommand("update tablename set password=@pass where username=@uname)", con); cmd.Parameters.AddWithValue("@uname", textBox1.Text); cmd.Parameters.AddWithValue("@pass", textBox2.Text); con.Open(); cmd.ExecuteNonQuery(); con.Close();

            P C 2 Replies Last reply
            0
            • S sumit7034

              add this code on button click dim cmd as new SqlCommand("update tablename set password=@pass where username=@uname)", con); cmd.Parameters.AddWithValue("@uname", textBox1.Text); cmd.Parameters.AddWithValue("@pass", textBox2.Text); con.Open(); cmd.ExecuteNonQuery(); con.Close();

              P Offline
              P Offline
              pmarfleet
              wrote on last edited by
              #6

              Storing passwords as clear text - don't you think that's a bit insecure? It is good practice to apply a 1-way salted hash[^] to passwords before storing them in a database. To check whether a user has entered the correct password, their input should be hashed and compared against the stored hash. The Membership API in ASP.NET 2.0 provides out-of-the-box support for password hashing.

              Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

              1 Reply Last reply
              0
              • S sumit7034

                add this code on button click dim cmd as new SqlCommand("update tablename set password=@pass where username=@uname)", con); cmd.Parameters.AddWithValue("@uname", textBox1.Text); cmd.Parameters.AddWithValue("@pass", textBox2.Text); con.Open(); cmd.ExecuteNonQuery(); con.Close();

                C Offline
                C Offline
                Christian Graus
                wrote on last edited by
                #7

                So, you know his database format ? And you think it's a good idea to use default names for controls ? What if textbox1 and textbox2 accidentally were swapped ?

                Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                1 Reply Last reply
                0
                • B bunny varun

                  Hi i am working in asp.net using vb.net and unable to change the password for a user i have 3 fields old password, new password and confirm password please help. Thankyou

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #8

                  In order to answer this, we need to know how you store the passwords to start with. I suggest you read this[^]. I'd start by learning enough about SQL to understand how to write a database query, then you can continue to work on the codebase that you've been given, and perform the task at hand.

                  Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                  1 Reply Last reply
                  0
                  • B bunny varun

                    i need to know the code for changing the password for a user using vb.net

                    V Offline
                    V Offline
                    Vasudevan Deepak Kumar
                    wrote on last edited by
                    #9

                    bunny.varun wrote:

                    i need to know the code

                    Read the forum posting guidelines first http://www.codeproject.com/kb/scrapbook/forumguidelines.aspx[^]

                    Vasudevan Deepak Kumar Personal Homepage
                    Tech Gossips
                    A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups