Click here to Skip to main content
15,919,028 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Why the error is giving in the line - mycountries.Readxml(MapPath("countries.xml"))

My coading is given below

<% @ Import NameSpace="System.Data"%>
<% @ Page Language="VB" Debug="true"%>
<Script  runat="server">
Sub Page_Load
if not Page.IsPostBack then
dim mycountries = New Dataset
rb.DataSource = mycountries
rb.DataValueField = "value"
rb.DataTextField = "Text"
End if
End Sub
Sub displayMassage (s As object, e As EventArgs)
Lbl1.Text = "Your Favourite Country is:" & rb.SelectedItem.Text
End Sub
<title>Hashtable with XML File</title>
<form  runat="server">
<asp:CheckBoxList id = "rb" runat = "server" AutoPostBack = "True" onSelectedIndexChanged = "displayMassage"/>
<asp:Label id = "Lbl1" runat = "server"/>
Updated 3-Jan-12 21:54pm
AmitGajjar 4-Jan-12 3:55am    
Pre tag added.

1 solution

Please check the XML file i think that contains Unicode characters. OR Xml data is in incorrect format
Share this answer
Janardan Pandey 4-Jan-12 3:37am    
But my XML file containts are given below





This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900