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 8099065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:16:47+00:00 2026-06-05T22:16:47+00:00

I am creating a website. It has a database and I’m trying to work

  • 0

I am creating a website. It has a database and I’m trying to work with the Member table.

On the page, I asked the user to fill out some basic information to become a member, once the submit button is clicked, I stored these information into a session object (which has MemberID, LastName, FirstName, and such) I was wondering how I can store all information in this session object to the Member table in the database? (The table has already been created)

Also, I would like to know when an existing member logs in. How can I get information from the database and display on the webpage (in case the member wants to edit his profile).

I am using Visual Studio 2010, coding in aspx, C#, and SQL database.

—– edit 8:13pm 6/17/2012 —–

I might not be clear when I first explain my problem.

I have a Member class in the .cs file, which has those variables states above. I created a new entry for a new member (on the web page), then store the object in session.

  • 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-06-05T22:16:50+00:00Added an answer on June 5, 2026 at 10:16 pm

    Personally I don’t see the need to use ASP.Net session state, based on what you’ve said.

    I presume you already have a button click handler to assign the control values of the submitted form to your Member object, and then you assign Member to session. But instead, this is the point at which you want to store Member to the database and not both with session.

    So pass the class instance to a method which will make use of ADO.Net. In the method create a SqlConnection object, and a SqlCommand object. There are more generalised versions but I’m assuming your using sql server. To your SqlCommand object add command text which should be an update SQL statement, and parameters. Finally execute the command to store to the database.

    Working through this introduction site should explain the finer detail. http://www.csharp-station.com/Tutorial/AdoDotNet/lesson01

    Reading the user information back is similar except you start to use a SqlDataReader. Again that article will help.

    Of course there is something called Entity Framework Code First which takes away all the plumbing between your code and the database.

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

Sidebar

Related Questions

I was creating a website http://tapasya.co.in and i found that this site has some
I am creating a website which has 1 dropdownlist that bound to Northwind database,
I am currently creating a website in php that has a database backend (can
Im sketching out a database layout for a website that has the potential to
I am creating an website. It has two web pages. I am trying to
I'm creating a web application for work where the user has to enter the
I'm creating a website that has both commenting and voting systems. I wanted to
I'm creating a website with a database search functionality, but I want to make
I am creating a website where a particular field in database is edited simultaneously
I'm creating a small car dealership website, and on my inventory page I need

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.