Free Training


C Language  |  CSS  |  MainFrame  |  VBScript  |  PHP  |  XML  |  C++ Tutorials  |  Ajax  |  JavaScript  |  CSS3  |  UML  |  jQuery  |  Microsoft AJAX

ASP.NET 2.0 Tutorials

 
Home Tutorials ASP.NET 2.0
 

ASP.NET 2.0 Free Tutorials : SqlDataSource Control

 

ASP.NET 2.0 Free Tutorials : SqlDataSource Control

Page 1 of 2

ASP.NET 2.0 Free Tutorials : SqlDataSource Control

In this tutorial you will learn about The Data Source Wizard - SqlDataSource Control, the process of setting up the data source.


The Data Source Wizard

DataSource controls enable programmers to declaratively connect data sources to the user interface. The logic for retrieving the data from the source is inbuilt into the control. For instance when a DropDownList is added to the form the developer is prompted to connect to the DataSource. On Clicking ‘connect to DataSource’, the wizard is started to guide the user through the process of setting up the data source.



The user has to indicate whether an existing data source or a new data source has to be added.



The DataSource that can be added can be a SQL server database or a Microsoft Access Database or a DataSet object or an XML file. In this instance we shall create a new SQLDataSource. In the Choose a DataSource drop down box, select < New DataSource > The next screen of the wizard prompts the user select the type of data source required




The user has to select the database and specify an ID for the DataSource. Click Ok to continue.

A connection string will now have to be specified. The connection can be an existing string or a new string. Since there are no existing connections a new one will be created.



Click on New Connection to create the connection string. A number of options are given to the user. Select Sql Server DataBase file to connect to the SQL Server Express database.



Next Page: ASP.NET 2.0 Free Tutorials : SqlDataSource Control - Page 2


Read Next: ASP.NET 2.0 Training : Data Bound Controls



 

 

Comments


Jun said:

  please provide more detail on usage of the sqlDataSource.
for example if i am using the SqlDataSource.Select([noarg]) how do i retrieve the recordset. how do i check if an empty set was returned.
not for gridview but rather display on a page.
December 13, 2006, 7:24 am

Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe