Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4621392
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:41:41+00:00 2026-05-22T02:41:41+00:00

I am trying to make a website. After I log in, there is an

  • 0

I am trying to make a website.

After I log in, there is an option for me to “edit user info”. In my EditUserInfo.aspx, users can change their password and date of birth. But the problem is, after they entered their password and DOB, how can I find their username in the database and update the password and DOB?

Here is the code for my editUserInfo function

public static bool EditUserInfo(string strCookieName, string password)
    {
        string query = "UPDATE usertb SET password = '" + password + "' WHERE username = '" + Name + "'";
    accessDB dbaccess = new accessDB();
    return dbaccess.saveData(query);

    }

I tried to use cookie following the Microsoft guide, but it is not working. and I also tried to use the Response.Redirect(EditUserInfo.aspx?Name=Username)

which the Username is from the textbox (txtUsername.text) but also seems not working.

So I wonder if anyone can offer me the correct syntax or any idea to make it work? Thanks a lot

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:41:41+00:00Added an answer on May 22, 2026 at 2:41 am

    When the user got to that form have you set up a session for them?

    You can use session like this:

    string id = Session["mysession"].ToString(); //GET
    Session["mysession"] = "Hello World"; //SET
    

    Cookies:

    HttpContext.Current.Request.Cookies["RememberLoginName"].Value //GET
    HttpContext.Current.Response.Cookies.Add(new HttpCookie("RememberLoginName", ValueforCookie)); //SET`
    

    If the user got to the edit form they should have logged in already. So you could store their userid in a session variable. Then when connecting to the database do a TryParse on the session variable to update the correct record.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm trying to make my second website using php and i'm stuck at some
I'm trying to make a navigation for my website and would greatly appreciate any
I'm trying to make a Google Maps widget for my website but all of
Hello i'm trying to make a tag script for my website so each time
I am trying to make the the ads at the bottom of the website
I'm trying to make a clean url for a blog on a dynamic website,
I am redesigning my personal / development website , and trying to make it
I'm trying to make a simple contact form for my website, so I bought
Recently I have been trying to make changes so I can do builds through
Guys, I am trying to make a website that keeps a cookie active, so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.