ASP.NET
  Home arrow ASP.NET arrow Inserting Data into a Microsoft SQL 2008 D...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Inserting Data into a Microsoft SQL 2008 Database in ASP.NET 3.5
By: Codex-M
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2010-03-08

    Table of Contents:
  • Inserting Data into a Microsoft SQL 2008 Database in ASP.NET 3.5
  • Create the Insert.aspx File in Visual Web Developer
  • Add/Configure DetailsView Controls to Insert.aspx
  • View and Test Project in the Browser

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Inserting Data into a Microsoft SQL 2008 Database in ASP.NET 3.5


    (Page 1 of 4 )

    In the previous article, "Creating an ASP.NET Dynamic Web Page using a MS SQL Server 2008 Database (GridView Display)," you learned how to create a dynamic web page that can let the user edit and delete database records directly using a web browser. It was demonstrated with a home renovation project, where team leaders can update and delete project tasks online. However, it does not include features that let users add or insert new records directly into the database using a web browser. This feature will be covered in this tutorial.

    It is recommended that you read the first part as well, to completely create the demo project in that tutorial in Visual Web Developer Express 2008. That project will be used and extended in this tutorial.

    Case Study Example: Home Renovation Project

    The case project study of the previous article displays database records in the web browser and then lets the user (the supervisor) either update or delete records (see screen shot): http://www.dotnetdevelopment.net/tutorials/gridview6.jpg

    Let's improve this by adding a feature that can accept new records from the browser and put them into the database. You can do this by following the plan below:

    You can create a new ASPX file called Insert.aspx which will be the page used for inserting records into the MS SQL database. The yellow color means that it is a new feature to be added, while the gray one is for the existing features of the previous web project.

    Of course, there should be an HTML hyperlink from the Default.aspx going to Insert.aspx and vice versa, so users can easily navigate though web contents for adding and updating data.

    Since Insert.aspx will be used to insert records, it needs ASP.NET controls for communicating with the Renovation project MS SQL database (details will be discussed below).

    More ASP.NET Articles
    More By Codex-M


       · it was a fabulous tutorial for asp.net newbies + they can use visual web developer...
     

    ASP.NET ARTICLES

    - ASP.NET 3.5: User Access Rules
    - ASP.NET 3.5: Creating Role Based Security wi...
    - ASP.NET 3.5 Role Based Security and User Aut...
    - Canonicalizing DotNetNuke URLs in ASP.NET 3.5
    - ASP.Net 3.5: User Account Creation for Your ...
    - ASP.NET 3.5 Basic User Account Management
    - Generate Dynamic Title Tag based on QueryStr...
    - Add a Blog Module in DotNetNuke
    - ASP.NET 3.5 Basic Navigation Controls
    - Create ASP.NET 3.5 Sitemap XML for Navigatio...
    - Completing Basic DotNetNuke Website Developm...
    - DotNetNuke Website Development in ASP.NET 3.5
    - ASP.NET Querystring: Basic Dynamic URL Forma...
    - InsertItemTemplate FormView Example in ASP.N...
    - Using the FormView Web Control in ASP.NET 3.5





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek