Data (How Do I in Visual Web Developer)
This page links to help on widely used tasks for displaying and editing data in ASP.NET Web pages. To view other categories of popular tasks covered in Help, see How Do I in Visual Web Developer.
The information in this topic is subdivided into the following sections:
Getting Started
Walkthroughs
SQL-based Databases
Business Objects
XML
Data Controls
Data Security
Getting Started
ASP.NET Data-Bound Web Server Controls Overview
Provides information on using controls to display data on ASP.NET Web pages.Data Source Controls Overview
Provides information on using declarative controls (data source controls) on ASP.NET Web pages to connect to data sources and read and write data.Binding to Data Using a Data Source Control
Provides information on how to associate display controls on the page with data source controls that perform data access.Using Parameters with Data Source Controls
Provides information on passing run-time information for search and update to data source controls.Sorting Data with Data Source Controls
Provides information on how to configure data source controls to sort data.Modifying Data using Data Source Controls
Provides information on how to configure data source controls to update or delete records in a data source.Filtering Data Using Data Source Controls
Provides information on how to configure data source controls to create subsets of the data returned by the data source control.Caching Data Using Data Source Controls
Provides information on how to configure data source controls to store data in memory for faster performance.
Walkthroughs
Walkthrough: Basic Data Access in Web Pages
Provides a tutorial on how to use the GridView control and SqlDataSource controls to display data on an ASP.NET Web page.Walkthrough: Displaying Data Using a Stored Procedure in the GridView Web Server Control
Provides a tutorial on using a SQL Server stored procedure to retrieve data.Walkthrough: Creating a Web Page to Display Access Database Data
Provides a tutorial on how to use the GridView control and AccessDataSource controls to display data from a Microsoft Access database on an ASP.NET Web page.Walkthrough: Creating Master/Detail Web Pages in Visual Studio
Provides a tutorial on how to use the DropDownList, GridView, DetailsView, and SqlDataSource controls to create pages that display lists of data where the user can select an individual record to examine further.Walkthrough: Editing and Inserting Data in Web Pages with the DetailsView Web Server Control
Provides a tutorial on using a DetailsView control to enable users to edit existing records and create new ones.Walkthrough: Data Binding to a Custom Business Object
Provides a tutorial on how to use the ObjectDataSource control to create multi-tier data access in an ASP.NET Web application.Walkthrough: Data Binding Web Pages with a Visual Studio Data Component
Provides a tutorial on how to use Visual Studio tools to create a data-access object that you can use with the ObjectDataSource control.Walkthrough: Displaying and Formatting Data with the DataList Web Server Control
Provides a tutorial on creating a DataList control, which enables you to display data in an HTML table using a layout you define.Walkthrough: Displaying Formatted Data in Web Pages with the FormView Web Server Control
Provides a tutorial on using a FormView control to display a single record at a time, using free-form layout templates that you define.Walkthrough: Displaying a Drop-Down List While Editing in the GridView Web Server Control
Provides a tutorial on how to customize the GridView control to display a drop-down list in edit mode.Walkthrough: Simple Sorting for the GridView Web Server Control
Provides a tutorial on how to use built-in features of the GridView control to enable users to sort the displayed data.Walkthrough: Creating a Web Page to Display XML Data
Provides a tutorial on using the XmlDataSource control to read XML data and the GridView and DropDownList controls to display the XML data on a page.Walkthrough: Displaying Hierarchical Data in a TreeView Control
Provides a tutorial on using the TreeView control to display XML data.Walkthrough: Displaying an XML Document in a Web Forms Page Using Transformations
Provides a tutorial on using the Xml control to display the contents of an XML document on a page.Walkthrough: Using ASP.NET Output Caching with SQL Server
Provides a tutorial on caching pages that are removed from the cache only when their dependent data in SQL Server changes.
SQL-based Databases
How to: Connect to a SQL Server Database Using the SqlDataSource Control
Provides steps for creating a connection string that can be used to access a SQL Server database.How to: Connect to an Oracle Database Using the SqlDataSource Control
Provides steps for reading and writing data in an Oracle database.How to: Connect to an ODBC Database Using the SqlDataSource Control
Provides steps for reading and writing data in any ODBC-compliant database.How to: Enable Filtering for the SqlDataSource Control
Provides information on how to configure a SqlDataSource control to create subsets of the data returned by the data source control.Selecting Data Using the SqlDataSource Control
Provides information on how to configure a SqlDataSource control to run database queries to return data.Modifying Data using the SqlDataSource Control
Provides information on how to configure a SqlDataSource control to update or delete in a database.Using Parameters with the SqlDataSource Control
Provides information on passing run-time information for search and update to a SqlDataSource control.Caching Data with the SqlDataSource Control
Provides information on how to configure a SqlDataSource control to store data in memory for faster performance.How to: Connect to an Access Database Using the SqlDataSource Control
Provides steps for reading and writing data in a Microsoft Access database.Retrieving Data Using the AccessDataSource Web Server Control
Provides steps for creating a connection string that can be used to open a Microsoft Access database.
Business Objects
Walkthrough: Data Binding to a Custom Business Object
Provides a tutorial on how to use the ObjectDataSource control to create multi-tier data access in an ASP.NET Web application.Walkthrough: Data Binding Web Pages with a Visual Studio Data Component
Provides a tutorial on how to use Visual Studio tools to create a data-access object that you can use with the ObjectDataSource control.Creating an ObjectDataSource Control Source Object
Provides information on creating a class that can be used as a middle-tier object accessible by the ObjectDataSource control.Using Parameters with the ObjectDataSource Control
Provides information on configuring parameter objects so you can pass update, delete, paging, and sorting information to an ObjectDataSource control.
XML
Walkthrough: Creating a Web Page to Display XML Data
Provides a tutorial on using the XmlDataSource control to read XML data and the GridView and DropDownList controls to display the XML data on a page.Filtering Data Using the XmlDataSource Control
Provides information on using XPath queries in the XmlDataSource control to find subsets of XML data.Binding a Tabular Control to the XmlDataSource Control
Provides information on reading XML data using the XmlDataSource control and displaying it in a control such as the GridView control.Walkthrough: Displaying Hierarchical Data in a TreeView Control
Provides a tutorial on using the TreeView control to display XML data.How to: Add XML Web Server Controls to a Web Forms Page
Provides steps for creating an Xml control using the Visual Web Developer designer. This control enables you to display an XML document on the page.How to: Load XML Data in the XML Web Server Control
Provides steps for configuring an Xml control to display an XML document or XML stream.How to: Transform XML Data in the XML Web Server Control
Provides steps for using a transformation with the Xml control to customize the display of XML data.
Data Controls
How to: Add DataList Web Server Controls to an ASP.NET Web Page
Provides steps for creating a DataList control, which enables you to display data in an HTML table using a layout you define.Walkthrough: Displaying and Formatting Data with the DataList Web Server Control
Provides a tutorial on creating a DataList control, which enables you to display data in an HTML table using a layout you define.How to: Allow Users to Delete Items in DataList Web Server Controls
Provides steps for configuring the DataList control to enable users to delete data records.How to: Allow Users to Edit Items in DataList Web Server Controls
Provides steps for configuring the DataList control to enable users to edit data records.How to: Allow Users to Select Items in DataList Web Server Controls
Provides steps for configuring the DataList control to enable users to select (highlight) a specific item.How to: Customize Items Dynamically in the DataList Web Server Control
Provides steps for how to use code to change the look or behavior of items in a DataList control at run time.How to: Specify Flow or Table Format in DataList Web Server Controls
Provides steps for how to set the layout of a DataList control.How to: Specify Horizontal or Vertical Layout in DataList Web Server Controls
Provides steps for how to set the layout of a DataList control.Walkthrough: Editing and Inserting Data in Web Pages with the DetailsView Web Server Control
Provides a tutorial on using a DetailsView control to enable users to edit existing records and create new ones.Modifying Data Using a DetailsView Web Server Control
Provides information on using the DetailsView control to enable users to edit data one record at a time.Paging in a DetailsView Web Server Control
Provides information on configuring the DetailsView control to enable users to page through multiple records, one at a time.Walkthrough: Displaying Formatted Data in Web Pages with the FormView Web Server Control
Provides a tutorial on using a FormView control to display a single record at a time, using free-form layout templates that you define.Modifying Data Using a FormView Web Server Control
Provides steps on using a FormView control to enable users to edit data one record at a time.Paging in a FormView Web Server Control
Provides information on configuring the FormView control to enable users to page through multiple records, one at a time.Walkthrough: Creating Master/Detail Web Pages in Visual Studio
Provides a tutorial on how to use the DropDownList, GridView, DetailsView, and SqlDataSource controls to create pages that display lists of data where the user can select an individual record to examine further.Walkthrough: Simple Sorting for the GridView Web Server Control
Provides a tutorial on how to use built-in features of the GridView control to enables users to sort the displayed data.How to: Customize Controls for Editing in the GridView Web Server Control
Provides steps on configuring the GridView control to display the controls that you choose when in edit mode.How to: Set GridView Web Server Control Column Width Dynamically
Provides steps for setting column widths in the GridView control according to the width of the data being displayed.How to: Respond to Button Events in Data-Bound Controls
Provides steps for how to handle events raised by button controls in list data controls such as the GridView, DataList, and Repeater controls.How to: Enable Default Deleting in the GridView Web Server Control
Provides steps for configuring the GridView control to enable users to delete data records.How to: Enable Default Editing in the GridView Web Server Control
Provides steps for configuring the GridView control to enable users to edit data records.How to: Enable Default Paging in the GridView Web Server Control
Provides steps for configuring the GridView control to enable users to page through long lists of data records.Walkthrough: Data Binding to a Custom Business Object
Provides a tutorial on how to use the ObjectDataSource control to create multi-tier data access in an ASP.NET Web application.Walkthrough: Data Binding Web Pages with a Visual Studio Data Component
Provides a tutorial on how to use Visual Studio tools to create a data-access object that you can use with the ObjectDataSource control.How to: Add Repeater Web Server Controls to a Web Forms Page
Provides steps for creating a Repeater control, which enables you to display data on an ASP.NET Web page using free-form layout templates that you define.How to: Respond to Button Events in DataList or Repeater Items
Provides steps for how to handle events raised by button controls in list data controls such as the GridView, DataList, and Repeater controls.How to: Create Web Server Control Templates Using the Designer
Provides steps for using the Visual Web Developer designer to create and edit templates in the GridView, DetailsView, FormView, DataList, and Repeater controls.How to: Create ASP.NET Web Control Templates Declaratively
Provides steps for creating templates in the GridView, DetailsView, FormView, DataList, and Repeater controls by editing the markup directly.How to: Bind to Data in a Templated Control
Provides steps for adding data-bound controls to templates in controls such as the GridView, DetailsView, FormView, DataList, and Repeater controls.
Data Security
Securing Data Access
Provides guidelines for improving the security of data access in ASP.NET Web applications.How To: Secure Connection Strings when Using Data Source Controls
Provides steps for encrypting connection strings for database access.How to: Access SQL Server as a Local User
Provides steps for configuring your application to log into SQL Server on the same computer as the Web server.How to: Access SQL Server Using a Mapped Windows Domain User
Provides steps for configuring your application to log into SQL Server using a specific Windows user account.How to: Access SQL Server Using Predetermined Credentials
Provides steps for configuring your application to log into SQL Server using a user name and password that you build into your application.How to: Access SQL Server Using Windows Integrated Security
Provides steps for configuring your application to log into SQL Server with the user's current Windows user account information.