Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 23, 2012 07:07 AM by asteranup
Member
9 Points
36 Posts
May 21, 2012 09:08 AM|LINK
how to bind country data with xml in asp.net c# by using only client side coding.
here is my xml code.
just i want client side code.
<?xml version="1.0" encoding="utf-8" ?> <NewDataSet> <tblCountry > <CountryID>1</CountryID> <CountryName>Abkhazia</CountryName> <FormalName>Republic of Abkhazia</FormalName> <Type>Proto Independent State</Type> <Capital>Sokhumi</Capital> <CurrencyCode>RUB</CurrencyCode> <CurrencyName>Ruble</CurrencyName> <TelephoneCode>+995</TelephoneCode> <ISOLetterCode>GEO</ISOLetterCode> <CountryCode>GE</CountryCode> <IsActive>true</IsActive> <OrderNumber>194</OrderNumber> </tblCountry> <tblCountry> <CountryID>2</CountryID> <CountryName>Afghanistan</CountryName> <FormalName>Islamic State of Afghanistan</FormalName> <Type>Independent State</Type> <Capital>Kabul</Capital> <CurrencyCode>AFN</CurrencyCode> <CurrencyName>Afghani</CurrencyName> <TelephoneCode>+93</TelephoneCode> <ISOLetterCode>AFG</ISOLetterCode> <CountryCode>AF</CountryCode> <IsActive>true</IsActive> <OrderNumber>1</OrderNumber> </tblCountry> <tblCountry> <CountryID>3</CountryID> <CountryName>Aland</CountryName> <Type>Proto Dependency</Type> <Sovereignty>Finland</Sovereignty> <Capital>Mariehamn</Capital> <CurrencyCode>EUR</CurrencyCode> <CurrencyName>Euro</CurrencyName> <TelephoneCode>+358-18</TelephoneCode> <ISOLetterCode>ALA</ISOLetterCode> <CountryCode>AX</CountryCode> <IsActive>true</IsActive> <OrderNumber>258</OrderNumber> </tblCountry> <tblCountry> <CountryID>4</CountryID> <CountryName>Albania</CountryName> <FormalName>Republic of Albania</FormalName> <Type>Independent State</Type> <Capital>Tirana</Capital> <CurrencyCode>ALL</CurrencyCode> <CurrencyName>Lek</CurrencyName> <TelephoneCode>+355</TelephoneCode> <ISOLetterCode>ALB</ISOLetterCode> <CountryCode>AL</CountryCode> <IsActive>true</IsActive> <OrderNumber>2</OrderNumber> </tblCountry> <tblCountry> <CountryID>5</CountryID> <CountryName>Algeria</CountryName> <FormalName>People's Democratic Republic of Algeria</FormalName> <Type>Independent State</Type> <Capital>Algiers</Capital> <CurrencyCode>DZD</CurrencyCode> <CurrencyName>Dinar</CurrencyName> <TelephoneCode>+213</TelephoneCode> <ISOLetterCode>DZA</ISOLetterCode> <CountryCode>DZ</CountryCode> <IsActive>true</IsActive> <OrderNumber>3</OrderNumber> </tblCountry> <tblCountry> <CountryID>6</CountryID> <CountryName>American Samoa</CountryName> <FormalName>Territory of American Samoa</FormalName> <Type>Dependency</Type> <SubType>Territory</SubType> <Sovereignty>United States</Sovereignty> <Capital>Pago Pago</Capital> <CurrencyCode>USD</CurrencyCode> <CurrencyName>Dollar</CurrencyName> <TelephoneCode>+1-684</TelephoneCode> <ISOLetterCode>ASM</ISOLetterCode> <CountryCode>AS</CountryCode> <IsActive>true</IsActive> <OrderNumber>238</OrderNumber> </tblCountry>
Star
11225 Points
1815 Posts
May 21, 2012 09:11 AM|LINK
refer http://www.csharpaspnetarticles.com/2012/05/populate-bind-dropdownlist-xml-file.html
14919 Points
1537 Posts
Microsoft
May 23, 2012 07:00 AM|LINK
Hi santosh225261,
One option for transforming the xml document to html is using XSLT. more details about it please rerfer
http://www.w3schools.com/xml/xml_xsl.asp
Hope this helps, thanks.
All-Star
30184 Points
4906 Posts
May 23, 2012 07:07 AM|LINK
Hi,
You can do this using ajax-
Using jQuery-
http://think2loud.com/224-reading-xml-with-jquery/
Using xmlHttpRequest object-
http://www.w3schools.com/ajax/ajax_xmlfile.asp
santosh22526...
Member
9 Points
36 Posts
how to bind country data with xml in asp.net c# by using only client side coding.
May 21, 2012 09:08 AM|LINK
how to bind country data with xml in asp.net c# by using only client side coding.
here is my xml code.
just i want client side code.
<?xml version="1.0" encoding="utf-8" ?>
<NewDataSet>
<tblCountry >
<CountryID>1</CountryID>
<CountryName>Abkhazia</CountryName>
<FormalName>Republic of Abkhazia</FormalName>
<Type>Proto Independent State</Type>
<Capital>Sokhumi</Capital>
<CurrencyCode>RUB</CurrencyCode>
<CurrencyName>Ruble</CurrencyName>
<TelephoneCode>+995</TelephoneCode>
<ISOLetterCode>GEO</ISOLetterCode>
<CountryCode>GE</CountryCode>
<IsActive>true</IsActive>
<OrderNumber>194</OrderNumber>
</tblCountry>
<tblCountry>
<CountryID>2</CountryID>
<CountryName>Afghanistan</CountryName>
<FormalName>Islamic State of Afghanistan</FormalName>
<Type>Independent State</Type>
<Capital>Kabul</Capital>
<CurrencyCode>AFN</CurrencyCode>
<CurrencyName>Afghani</CurrencyName>
<TelephoneCode>+93</TelephoneCode>
<ISOLetterCode>AFG</ISOLetterCode>
<CountryCode>AF</CountryCode>
<IsActive>true</IsActive>
<OrderNumber>1</OrderNumber>
</tblCountry>
<tblCountry>
<CountryID>3</CountryID>
<CountryName>Aland</CountryName>
<Type>Proto Dependency</Type>
<Sovereignty>Finland</Sovereignty>
<Capital>Mariehamn</Capital>
<CurrencyCode>EUR</CurrencyCode>
<CurrencyName>Euro</CurrencyName>
<TelephoneCode>+358-18</TelephoneCode>
<ISOLetterCode>ALA</ISOLetterCode>
<CountryCode>AX</CountryCode>
<IsActive>true</IsActive>
<OrderNumber>258</OrderNumber>
</tblCountry>
<tblCountry>
<CountryID>4</CountryID>
<CountryName>Albania</CountryName>
<FormalName>Republic of Albania</FormalName>
<Type>Independent State</Type>
<Capital>Tirana</Capital>
<CurrencyCode>ALL</CurrencyCode>
<CurrencyName>Lek</CurrencyName>
<TelephoneCode>+355</TelephoneCode>
<ISOLetterCode>ALB</ISOLetterCode>
<CountryCode>AL</CountryCode>
<IsActive>true</IsActive>
<OrderNumber>2</OrderNumber>
</tblCountry>
<tblCountry>
<CountryID>5</CountryID>
<CountryName>Algeria</CountryName>
<FormalName>People's Democratic Republic of Algeria</FormalName>
<Type>Independent State</Type>
<Capital>Algiers</Capital>
<CurrencyCode>DZD</CurrencyCode>
<CurrencyName>Dinar</CurrencyName>
<TelephoneCode>+213</TelephoneCode>
<ISOLetterCode>DZA</ISOLetterCode>
<CountryCode>DZ</CountryCode>
<IsActive>true</IsActive>
<OrderNumber>3</OrderNumber>
</tblCountry>
<tblCountry>
<CountryID>6</CountryID>
<CountryName>American Samoa</CountryName>
<FormalName>Territory of American Samoa</FormalName>
<Type>Dependency</Type>
<SubType>Territory</SubType>
<Sovereignty>United States</Sovereignty>
<Capital>Pago Pago</Capital>
<CurrencyCode>USD</CurrencyCode>
<CurrencyName>Dollar</CurrencyName>
<TelephoneCode>+1-684</TelephoneCode>
<ISOLetterCode>ASM</ISOLetterCode>
<CountryCode>AS</CountryCode>
<IsActive>true</IsActive>
<OrderNumber>238</OrderNumber>
</tblCountry>
amit.jain
Star
11225 Points
1815 Posts
Re: how to bind country data with xml in asp.net c# by using only client side coding.
May 21, 2012 09:11 AM|LINK
refer http://www.csharpaspnetarticles.com/2012/05/populate-bind-dropdownlist-xml-file.html
amiT jaiN
ASP.NET C# VB Articles And Code Examples
Yanping Wang...
Star
14919 Points
1537 Posts
Microsoft
Re: how to bind country data with xml in asp.net c# by using only client side coding.
May 23, 2012 07:00 AM|LINK
Hi santosh225261,
One option for transforming the xml document to html is using XSLT. more details about it please rerfer
http://www.w3schools.com/xml/xml_xsl.asp
Hope this helps, thanks.
Feedback to us
Develop and promote your apps in Windows Store
asteranup
All-Star
30184 Points
4906 Posts
Re: how to bind country data with xml in asp.net c# by using only client side coding.
May 23, 2012 07:07 AM|LINK
Hi,
You can do this using ajax-
Using jQuery-
http://think2loud.com/224-reading-xml-with-jquery/
Using xmlHttpRequest object-
http://www.w3schools.com/ajax/ajax_xmlfile.asp
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog