Friday, May 9, 2008

Know- Knowledge or No Knowledge About DataSources

AccessDataSource
Provides binding to a Microsoft Access database file that has the .mdb extension.

SqlDataSource
Provides binding to an Open Database Connectivity (ODBC), Object Linking and Embedding Database (OLEDB), SQL Server, Oracle, or other database that uses Structured Query Language (SQL). You can even attach to a SQL Server database file by simply including it in your project.

XmlDataSource
Provides binding to an XML file in your project folder. You can specify a transform file that can be used to modify the XML file before it is bound to a control. You can also provide an XPath expression to retrieve a subset of the data in the XML file.

ObjectDataSource
Provides binding to an object. The ObjectDataSource can connect to a middle-tier business object or DataSet object in the Bin or App_Code directory of your application.
When using this option, you can select a class that you have access to, and an instance of the class is created for you each time that data is required. In addition to selecting a class, you must choose the methods you want to execute to select, insert, update, and delete. The select method should return a single object that implements IEnumerable, IListSource, IDataSource, or IHierarchicalDatasource. This means that a DataTable object, a DataSet object, or a collection object can be used. If the select method returns a DataSet object, the first DataTable object in the DataSet is used.

SitemapDataSource
You can connect to the site navigation tree for your application.
This option requires a valid sitemap file at the application root.

A server control is a control that is programmable by writing server-side code to respond to events from the control.

Server controls contain the runat="server" attribute.

HTML server controls are useful when ASP Web pages need to be migrated to ASP.NET 2.0 pages.

HTML server controls are also useful when the server control has a lot of client-side JavaScript.

Web server controls are much more powerful than HTML controls because a single
Web server control can render as many HTML elements and JavaScript code blocks.

ViewState is the mechanism by which Web page object and child control object data can be maintained between page requests.

Post From,
Mansoor Ali

No comments: