SqlDataSource control

The SqlDataSource control enables you to use a web control to access data located in a relational data base, including Microsoft SQL Server and Oracle databases, as well as OLE DB and ODBC data sources.

The most common way to use a SqlDataSource control is to specify it in the Data Source Configuration Wizard when you set the Data Source of a data-bound control such as the GridView control, FormView control, DetailsView control, DataList control, or Repeater control.

You can also add a SqlDataSource control to a page by dragging it from the Toolbox task pane onto your page. When the control is on your page, right-click it and choose Properties to open the Tag Properties task pane where you can set properties for the control.


Many ASP.NET controls do not have a visual representation at run time. The control is always visible in Code view. If you do not see a representation of the control in Design view, on the View menu, point to Visual Aids and then click ASP.NET Non Visual Controls.

For more information about using the SqlDataSource control, see SqlDataSource Web Server Control (Visual Studio) in the MSDN library.

Community Additions