Accessing and Updating Data in ASP.NET 2.0: Inserting Data 01 May 2007 00:00 GMT| A Multipart Series on ASP.NET 2.0's Data Source Controls |
|---|
ASP.NET 2.0 introduced a number of new Web controls designed for accessing and modifying data.
These controls allow page developers to declaratively access and modify data without writing any
code to perform the data access. This article is one in a series of articles on ASP.NET 2.0's new data
source controls.
|
Data Source Control Basics - explores the concepts
and advantages of data source controls, and compares their usage in ASP.NET 2.0 to data access techniques in ASP.NET 1.x.Accessing Database Data - shows how to use the
SqlDataSource and AccessDataSource controls to query data from a relational database.Filtering Database Data with Parameters - learn how to
retrieve just a subset of database data based on hard-coded values and values from the querystring, other Web controls on the page,
session variables, and so on.Retrieving XML Data with XmlDataSource Control - see how
to retrieve both remote and local XML data and display it in a data Web control.Creating Custom Parameter Controls - learn how
to create your own custom, declarative Parameter controls for use in the data source controls' parameters collections.Examining the Data Source Control's Events - explore the
events raised during a data source control's lifecycle.Declaratively Caching Data - learn how to cache data
to the data cache simply by setting a couple of data source control properties.Programmatically Accessing Data using the Data Source Controls -
programmatically retrieve, insert, delete, and update data using the SqlDataSource and AccessDataSource controls.Inserting Data - learn how to insert data using
a SqlDataSource control. Also examines how to retrieve the IDENTITY column value for the just-inserted record.
(Subscribe to this Article Series!
)
ASP.NET 2.0's data source and data Web controls make working with data much easier than in previous versions. These controls
allow for a declarative approach to working with data, without needing to write any cumbersome data access code. The
articles we have explored in the series thus far have focused on understanding the core concepts of the data source
controls and how to retrieve data from the database. In addition to retrieving data, the data source controls can also
insert, update, and delete data.
In this article we will focus on using the SqlDataSource control to insert records into a database. We will look at three examples:
using a SqlDataSource and to insert a record using values entered by the user through various TextBoxes, DropDownLists, and
other Web controls on an ASP.NET page; inserting using a SqlDataSource and a DetailsView
control; and determining the value of the just-inserted record's IDENTITY column. Read on to learn more!
Read More >
Source: 4GuysFromRolla Maintaining a Log of Database Changes - Part 2 25 Apr 2007 00:00 GMT
In Part 1 of this two-part article series we looked at
the motivation behind maintaining a log of database changes and compared and contrasted different techniques for persisting
historical data to "history" tables. In addition to creating the table (or tables) to store the historical data, we
also need to devise some mechanism to insert any changes to the "history" table(s) whenever data is inserted, updated, or
deleted from a table whose history is being tracked.
Triggers are designed to execute T-SQL in response to
INSERT, UPDATE, and DELETE commands, and therefore are often used to add the historical
data to the "history" tables. Alternatively, historical information can be manually recorded each time an insert, update, or
delete is performed. This is most easily accomplished when using stored procedures to perform all data modifications.
In this article we will discuss the pros and cons of using triggers and manual techniques for maintaining changes to
a database table. We will also build trigger- and manual-based implementation from the ground up. Read on to learn more!
Read More >
Source: 4GuysFromRolla Webcasts on Visual Studio Extensibility 20 Apr 2007 22:34 GMTLive Webcast May 07, 2007 11:00 AM Pacific Time: Grow Your Business and Reach More Developers by Extending Visual Studio.
Live Webcast May 03, 2007
9:00 AM Pacific Time: Grow Your Business and Reach More Developers by Extending Visual Studio
Source: MSDN Boost ASP.NET Performance with Precompilation 19 Apr 2007 18:43 GMTUse ASP.NET Whidbey's precompilation feature to minimize the initial load time of your ASP.NET web pages, and avoid having to deploy your source code to the server.
Source: DevX Download Visual Studio Code Name “Orcas” Beta 1 19 Apr 2007 05:27 GMTMicrosoft® Visual Studio® code name “Orcas” is the next generation development tool for Windows Vista, the 2007 Office system, and the Web. With Visual Studio code name “Orcas” you can rapidly create more secure, manageable and reliable applications that take advantage of Windows Vista™ and the 2007 Office system. Visual Studio code name “Orcas” also helps you build the latest AJAX enabled web or Windows Mobile-based applications. Download Beta 1 today for an early look at what’s to come.
Source: MSDN Using Namespace Aliases in .NET 19 Apr 2007 00:59 GMTIn most cases, when there are namespace conflicts, developers tend to use the complete qualified name in the code.
Source: DevX Everyday Use of Generics 18 Apr 2007 01:28 GMTGenerics aren't a Ferrari that you only take out for special occasions; they're more like your trusty pickup, perfectly suited for everyday use.
Source: DevX