Welcome to W3Courses
 Like Us on Facebook

Drop Down

How to Populate Drop Down List with XML Source in Asp.Net

You can populate an Asp.Net DropDownList control with an Xml source. This becomes very handy while displaying static dropdown items such as list of states, months, days, dates etc.

First create an xml file, name it dropdown.xml and add the following code to the file

Share

Multi Level Drop Down Category & Subcategory Hierarcheal Selection using JavaScript

This code will enable you to populate the list of states depending on the country selection. For example if you choose United States in the country drop down selection, the state drop down will contain Alaska, California etc. Else if you choose Canada, the state drop down list will contain Alberta, British Columbia etc.

All of this is done without reloading the page. This script could also be used in other formats, e.g., automobiles: type/make/model; or books: publisher/author/title. In order implement this script, perform the instructions below:

Share