ASP. NET Web Forms-XML file, formsxml

Source: Internet
Author: User

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"/>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.