i
Web Application Fundamentals
Using Internet Information Services
Web Forms
ASP.NET MVC
Web Services
ASP.NET Features
Request/Response Programming
HttpRequest Class
HTTP Collections
HttpResponse Class
Redirection
HttpUtility Class
Using Visual Web Developer
Visual Studio Forms Designer
Using Components
Shadow Copying
Using the Global.asax File
Data Binding
Different Types Of Caching
How to use Object cache
Optimizing Your ASP.NET Application
What Is Caching [Storage]
Forms Authentication
Windows Authentication
ASP.NET Security Fundamentals
Data Source Controls
SqlDataSource
SiteMapDataSource
The AccessDataSource Control
ObjectDataSource
Connection String Storage
GridView
DetailsView
FormView
ListView
DataPager
Entity Data Model
EntityDataSource
Remote Method Calls
Ajax Control Toolkit
Ajax Client Library
Rich Client Applications
Ajax [Asynchronous JavaScript and XML]
ScriptManager
UpdatePanel
Model-View-Controller Pattern
ASP.NET MVC versus Web Forms
ASP.NET MVC Projects in Visual Studio
Action Methods in MVC
Routing in MVC
Strongly-Typed Views [Add images here from the visual studio]
Model Binding
Validation
ADO.NET [ActiveX Data Object]
ASP.NET Data Providers
Connections
Commands
DataReaders and Connected Access
DataSets and Disconnected Access
Data source controls are the server-side controls. You can simply drag & drop controls from the toolbox and put it on your page at design time. They manage the tasks of inserting, updating, selecting, and deleting data on a web page. Data source control performs those tasks in combination with data-bound controls. It has no user-interface. They implemented as server controls so that they can help to the declarative syntax. The data-bound controls provide the UI elements that enable a user to interact with the data by triggering events & that will give a call to the data source controls.
There are six data source controls available in .NET. They can found in a “System.Web.UI.WebControls” namespace.
XmlDataSource
SiteMapDataSource
SqlDataSource
AccessDataSource
ObjectDataSource
DataSetDataSource
XmlDataSource
It represents an XML data. It can be used to display both hierarchical and tabular data. It typically loads data from an XML file, which specified by the DataFile property. XML data can also store directly by the data source control in string form. If we want to transform the XML data before it displayed by a data-bound control, we can provide an Extensible Stylesheet Language style sheet for the conversion. As with the XML data, we load the style sheet from a file, specified by the TransformFile property, but we can also store in string form using the Transform property.
Example:
We will see one example, which demonstrates how we can use the XmlDataSource in application
We will create a web site. We will add one form. I have added a web form, and its name is "XmlDataSource.asp"
You can see the Toolbox on the left side, which will display the "XmlDataSource" item.
We will drag that item newly added web page. Below is a screenshot I have added the new "XML file."
Now go to the design mode and click on the smart tag button the “XmlDataSource” and click on the “Configure Data Source." It will open the window like below.
Now, go to the "TreeView" Control.
I choose the data source selects the "XmlDataSourceId1" as it is the id of "XmlDataSource " that we just created in the above steps.
You can see the latest code in the file "XmlDataSource.aspx."
Design form will look like below:
Below will be the final output.
Don't miss out!