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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:28:21+00:00 2026-05-26T14:28:21+00:00

This is my first asp.net web application that needs a sql database. I configured

  • 0

This is my first asp.net web application that needs a sql database. I configured the database with the table and all of the columns that I need on my webserver.

What i did so far is in web.config:

<connectionStrings>
<add name="MyConnectionString" connectionString="Data Source=; Initial Catalog=; User ID=; Password=;"
providerName="System.Data.SqlClient" />
</connectionStrings>

and in a simple application form:

protected void Button1_Click(object sender, EventArgs e)
{
    SqlDataSource nexusdb = new SqlDataSource();
    nexusdb.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["MyConnectionString"].ToString();

    nexusdb.InsertCommandType = SqlDataSourceCommandType.Text;
    nexusdb.InsertCommand = "INSERT INTO Windows (Firstname, Lastname, Email, Phone, Company, Date, IPAddress) VALUES (@Firstname, @Lastname, @Email, @Phone, @Company, @Date, @IPAdress)";

    nexusdb.InsertParameters.Add("Firstname", FirstNametxtbox.Text);
    nexusdb.InsertParameters.Add("Lastname", LastNametxtbox.Text);
    nexusdb.InsertParameters.Add("Email", Emailtxtbox.Text);
    nexusdb.InsertParameters.Add("Phone", Phonetxtbox.Text);
    nexusdb.InsertParameters.Add("Company", Companytxtbox.Text);
    nexusdb.InsertParameters.Add("Date", DateTime.Now.ToString());
    nexusdb.InsertParameters.Add("IPAddress", Request.UserHostAddress.ToString());
}

However nothing in my table ?!

  • 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-26T14:28:21+00:00Added an answer on May 26, 2026 at 2:28 pm

    Please read this article about Inserting Data Into a SQL Database. You will find it in both C# and VB
    This got good example of inserting data in to database

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

Sidebar

Related Questions

I need to write a web application using SQL Server 2005, asp.net, and ado.net.
This is my first test for Asp.Net Web Application. We have an Engine consisting
I have a ASP.NET web application that allows end users to upload a file.
This is my first ASP.NET MVC application, and my first on an IIS 7.x
I am building an ASP.NET application that needs dynamic tables. That's another issue that
I just discovered that every request in an ASP.Net web application gets a Session
I'm working on my first application using ASP.Net with web services and I'm having
Iam new to ASP.NET and poking around my first ASP Web Application projects in
I have an ASP.NET web application I built for a client that uses default
We need to be able to run two versions of one ASP.net web application

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.