<% @ Import NameSpace="System.Data"%> <% @ Page Language="VB" Debug="true"%> <Script runat="server"> Sub Page_Load if not Page.IsPostBack then dim mycountries = New Dataset mycountries.Readxml(MapPath("countries.xml")) rb.DataSource = mycountries rb.DataValueField = "value" rb.DataTextField = "Text" rb.DataBind() End if End Sub Sub displayMassage (s As object, e As EventArgs) Lbl1.Text = "Your Favourite Country is:" & rb.SelectedItem.Text End Sub </script> <html> <head> <title>Hashtable with XML File</title> </head> <body> <form runat="server"> <asp:CheckBoxList id = "rb" runat = "server" AutoPostBack = "True" onSelectedIndexChanged = "displayMassage"/> <p> <asp:Label id = "Lbl1" runat = "server"/> </p> </form> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)