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

  • Home
  • SEARCH
  • 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 8185543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:53:02+00:00 2026-06-07T01:53:02+00:00

Sorry If I am posting this question in the wrong forum. This is my

  • 0

Sorry If I am posting this question in the wrong forum. This is my first time posting at Stackoverflow. And Also I am learning ASP.NET and C# by myself so pardon me if this elementary.

I have created a class file in ASP.NET 4.0 C# using visual studio 2010. My code is like below

namespace My.Customers
{
    public class EmailMailingList
    {
        #region members

        private string _emailList;

        #endregion

        #region properties

        /// <summary>
        /// gets or sets Customer Email for Mailing List
        /// </summary>
        public string EmailList
        {
            get { return _emailList; }
            set { _emailList = value; }
        }

        #endregion
    }
}

I have a Database table in SQL 2008 named MailingList with 2 fields namely Id and Email where Id is int with auto increment and Email Varchar(50).

I also created a Stored Procedure based on this table to enter the email address.

where I am getting confused is How can I add this info to my class file so the data can be saved to the database.

I also created a web form called Join-Mailing-List.aspx with a textbox called tbEmail and a Submit Button called Join.

What I am trying to is when someone enters the email address in the textbox I want to pass the textbox value to string EmailList in my class file and save the data to the database.

I know how to pass the textbox value to my class file. I just dont know how to save the info to the DB without using the DB code in the aspx page

Thanks and really appreciate for any advice or examples

  • 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-07T01:53:05+00:00Added an answer on June 7, 2026 at 1:53 am

    There are a number of different ways to save information to a database using C#. Some of the more common:

    • ADO.NET
    • Linq-To-SQL
    • Entity Framework

    You will probably need to read up on those to find the best one for you. If you want something quick and relatively easy, I would probably go with ADO.NET but others may disagree.

    As far as how to include the code for the update in your class you could just add an Update() or Save() function.

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

Sidebar

Related Questions

First sorry for posting this here.I just got no answer to this question on
this is my first time posting a question here - I've searched for ones
First of all sorry guys for posting the question here. The support forum seems
Sorry for posting this question again. I rephrased my question a little bit. I
Sorry for posting so many nubbin questions on ASP.net, I'm getting the hang of
Hey, sorry for posting this here, I know that this question better suites into
Sorry to be posting this question. :( But I have spent almost the entire
Sorry, for double posting, already posted this question once, but I realized I weren't
I'm sorry if this isn't the right place to be posting a question like
First up, sorry for the mega-posting of code but... I have the following DB

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.