Accessing and Updating Data in ASP.NET 2.0: Updating Basics 01 Aug 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.Deleting Data - see how to delete data using
a SqlDataSource control. Also looks at how to programmatically cancel a delete.Updating Basics - learn the basics of updating database data using a
SqlDataSource control. Also examines using the GridView to provide a web-based editing interface.
(Subscribe to this Article Series!
)
ASP.NET 2.0's data source controls make it possible to retrieve, insert, update,
and delete data without having to write the tedious dedata access code that was so commonplace in ASP.NET
version 1.x. Previous installments of this article series have looked at returning, inserting, and deleting data using the SqlDataSource
control. However, we have yet to look at updating data.
In addition to the SqlDataSource control, ASP.NET 2.0 introduces three new data Web controls: the GridView, the DetailsView, and the
FormView. These controls can work in unison with the data source controls to facilitate inserting, updating, and deleting data.
In this article we will examine basics of using the SqlDataSource and GridView controls to update records from a database. In particular,
we look at enabling editing support in the GridView. Future installments will explore more advanced updating scenarios, such as customizing
the GridView's editing interface and programmatically setting the updated values. Read on to learn more!
Read More >
Source: 4GuysFromRolla Sync Your Database to SharePoint Using SSIS 31 Jul 2007 02:30 GMTDiscover how to import and export SharePoint list items using SQL Server Integration Services and the new Collaborative Application Markup Language (CAML).
Source: DevX Download .NET Framework 3.5 Beta 2 27 Jul 2007 16:23 GMTSee all of the improvements that are coming in Visual Studio 2008 with next-generation Web development, integrated development for the Microsoft Office system, and industry-leading designers for Windows Vista.
Source: MSDN Download Visual Studio 2008 Beta 2 27 Jul 2007 16:21 GMTSee all of the improvements that are coming in Visual Studio 2008 with next-generation Web development, integrated development for the Microsoft Office system, and industry-leading designers for Windows Vista.
Source: MSDN Take Advantage of Two-Way Data Binding in ASP.NET 27 Jul 2007 00:26 GMTIt's always been easy to display data in ASP.NET by binding it to controls. But now, ASP.NET 2.0 lets you bind data that's changed or entered in the controls back to the data source as well.
Source: DevX ASP.NET Charting with NPlot 25 Jul 2007 00:00 GMT
Three years ago I wrote an article here on 4Guys titled ASP.NET Charting Using
Office Web Components (OWC) that examined how to use OWC as a charting engine in ASP.NET applications.
OWC is still a very powerful charting engine, but unfortunately it carries with it some serious drawbacks:
- OWC is a COM library, which needs to be installed on the ASP.NET web server. If you do not run your own web server, you may have
difficulty getting these libraries installed.
- Calling COM libraries from .NET code introduces additional difficulty and overhead that can be avoided by using native .NET DLL's.
In contrast to COM components, a .NET library is simply a DLL file that needs only to be distributed with the web application in its
/Bin directory. There is no need for a separate installation on the web server. - Microsoft's support for OWC has dwindled. Earlier versions of OWC came bundled with Microsoft Office, but this has been discontinued
in Office 2007. OWC11, which came bundled with Office 2003, seems to be the final version. There are no signs of a similar .NET library
being developed by Microsoft.
There are several commercial charting libraries available for ASP.NET. They are extensively advertised, and can certainly do the job. However,
frugal developers like me may prefer freeware alternatives. In this article we will examine using NPlot
to create charts in an ASP.NET application. NPlot is a free, .NET native charting engine that excels at scientific charting.
Read on to learn more!
Read More >
Source: 4GuysFromRolla MSDN Magazine: Basic Instincts: Query Comprehensions 20 Jul 2007 15:53 GMTUnderstand the key concepts that drove the design of LINQ, and get a custom query provider that shows how this information can be used in real-world applications. You can download it from the MSDN Magazine Web site. This article assumes a working knowledge of database programming and a passing familiarity with LINQ.
Source: MSDN Returning an IPv4 Address in an IPv6-Enabled Environment 18 Jul 2007 00:00 GMT
The Internet is best described as a "network of networks," and every device which is connected to the Internet is uniquely identified by its
Internet Protocol (IP) address.
When client browsers connect to websites, they pass along a collection of information which the website can use for various purposes - these
are known as the Request Headers, and the IP address of the client machine is included in this information. Although a machine's IP address is
not guaranteed to be 100% accurate, many web developers capture it for logging and other purposes.
One challenge in capturing IP addresses is that there are differences in the IP address format between IP version 4 and IP version 6.
When the IPv4 protocol is the only protocol enabled on the web server, accessing the IP address in the Request Headers will return
the familiar IPv4 address. However, if IPv6 is also enabled, it will take precedence over IPv4. While earlier versions of Windows supported
IPv6, Windows Vista is the first to have it enabled by default. Therefore, if you are using Windows Vista as the operating system for your development
machine or web server, you may have noticed
that the client IP addresses retrieved from the Request Headers are being returned in the IPv4 format.
In this article we will examine a short bit of code that will seamlessly convert the IPv6 address returned by Windows Vista (or other IPv6-enabled
environments) into an IPv4 format. This is useful if your database or back-end logic is expecting an IPv4 address. Read on to learn more!
Read More >
Source: 4GuysFromRolla