ASP. NET Web Forms-XML file, formsxml
ASP. NET Web Forms-XML file
We can bind an XML file to the list control.
An XML file
Here is an xml file named "countries. XML:
Norway
N
Sweden
S
France
F
Italy
I
Bind DataSet to List control
First, import the "System. Data" namespace. We need the namespace to work with the DataSet object. Include the following command at the top of the. aspx page:
<% @ Import Namespace = "System. Data" %>
Next, create a DataSet for the XML file and load the XML file into DataSet when the page is loaded for the first time:
AutoPostBack = "True" onSelectedIndexChanged = "displayMessage"/>
Then we add a child routine. When you click a project in the RadioButtonList control, the child routine will be executed. When a single-choice button is clicked, a line of text appears in the label:
Instance
<% @ Import Namespace = "System. Data" %>
AutoPostBack = "True" onSelectedIndexChanged = "displayMessage"/>