Hi all,
I have an xml file that displays class dates (Day 1 and Day2). I have sucessfully populated the dropdownlist1 with the Day1 Data. I want to add onselectedchanged to the dropdownlist1 to run another sub procedure that will return the value of day2 for the selected record.
Then bind it to a label.
below is the xml file and the aspx page
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dataroot xmlns:xsi=" <Class>
<Day1>Access 2003 Level - 1 03/05/08</Day1>
<Day2>03/07/08</Day2>
</Class>
<Class>
<Day1>Access 2003 Level 2 - 03/24/08</Day1>
<Day2>03/31/08</Day2>
</Class>
</dataroot>
----------------------------------------------------------
<%@ Import Namespace="System.Data" %><script runat="server">
sub Page_Load
if Not Page.IsPostBack then
dim myclasses=New DataSet
myclasses.ReadXml(MapPath("classes.xml"))
DropDownList1.DataSource = myclasses
DropDownList1.DataTextField = "Day1"
DropDownList1.DataValueField = "Day1"
DropDownList1.DataBind()
End if
end sub
</script>
<html>
<body><form runat="server">
Instructor Led Class: <asp
ropDownList id="DropDownList1" runat="server"></asp
ropDownList>
</form>
</body>
</html>
I want to add onselectedchanged to the dropdownlist1 to run another sub procedure that will return the value of day2 for the selectedrecord.
Then bind it to a lable.
Stumped...
any help is greatly appreciated
thank you
I have an xml file that displays class dates (Day 1 and Day2). I have sucessfully populated the dropdownlist1 with the Day1 Data. I want to add onselectedchanged to the dropdownlist1 to run another sub procedure that will return the value of day2 for the selected record.
Then bind it to a label.
below is the xml file and the aspx page
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dataroot xmlns:xsi=" <Class>
<Day1>Access 2003 Level - 1 03/05/08</Day1>
<Day2>03/07/08</Day2>
</Class>
<Class>
<Day1>Access 2003 Level 2 - 03/24/08</Day1>
<Day2>03/31/08</Day2>
</Class>
</dataroot>
----------------------------------------------------------
<%@ Import Namespace="System.Data" %><script runat="server">
sub Page_Load
if Not Page.IsPostBack then
dim myclasses=New DataSet
myclasses.ReadXml(MapPath("classes.xml"))
DropDownList1.DataSource = myclasses
DropDownList1.DataTextField = "Day1"
DropDownList1.DataValueField = "Day1"
DropDownList1.DataBind()
End if
end sub
</script>
<html>
<body><form runat="server">
Instructor Led Class: <asp
</form>
</body>
</html>
I want to add onselectedchanged to the dropdownlist1 to run another sub procedure that will return the value of day2 for the selectedrecord.
Then bind it to a lable.
Stumped...
any help is greatly appreciated
thank you