In this tutorial you will learn the C# code to bind the parent DataList control and binding the related data items to the nested DataList control.
DataList control in ASP.Net 2.0 can by nested inside the other DataList control to display the related items of any item. To work with nested DataList control in ASP.Net 2.0 using C# you must be familiar with Type casting of control objects.
In ASP.Net XmlDocument class provides the Load method that allows you to pass the path of XML file in the way as we passed the path to DataFile Property of XmlDataSource class object
You can create an object of XMLDataSource class to allocate the memory for XML data retrieved from the DataSource. Then set the values for DataFile property and XPath property of XMLDataSource class object and bind the data object to DataList Control
In ASP.Net 2.0 you can bind the XML data with DataList control using XmlDataSource control. DataFile property accesses the XML file from the specified URL path and collects the nodes in memory according to the specified XPath query expression
In ASP.Net you can bind the XML data to DataList control using different ways of DataBinding. ASP.Net framework provides multiple ways of programming to bind the XML data file to the ASP.Net data bound control like DataList.
You can use the Javascript confirm message box along with Delete link button placed inside the ItemTemplate of DataList control. Confirm message enables you to warn and ask the user before taking the delete action for removing the record permanently from the data store by mistake
Delete Command of ASP.Net DataList Control provides you the functionality to permanently remove the record from the database. Delete action will execute only when user will click the delete link button having the CommandName property value equal to delete.
Update Command of ASP.Net DataList control provides you the functionality to save the changes done in the values of textbox controls placed inside the EditItemTemplate into the database table. In this tutorial we will use C# code to update the data items that will execute when user will hit the update link button.
Cancel command is almost similar to edit command of DataList control. In this tutorial we will learn the C# code for ASP.Net DataList Cancel command function. You can use a link button or command button control in the DataList control with CommandName property value equal to "cancel".