C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » XML »

How to bind XML in radio button list


Posted Date: 15 Aug 2009    Resource Type: Articles    Category: XML
Author: VeerabaguMember Level: Gold    
Rating: 1 out of 5Points: 7



How to bind XML in radio button list

From xml we can bind the data to radio button list

see the following code:


<%@ Import Namespace="System.Data" %>

<script runat="server">
sub Page_Load
if Not Page.IsPostBack then
dim ds=New DataSet
ds.ReadXml(MapPath("name.xml"))
radio.DataSource=ds
radio.DataValueField="value"
radio.DataTextField="text"
radio.DataBind()
end if
end sub

sub show(s as Object,e As EventArgs)
lbldisplay.text="Your favorite name is: " & radio.SelectedItem.Text
end sub
</script>

<html>
<body>

<form runat="server">
<asp:RadioButtonList id="radio" runat="server"
AutoPostBack="True" onSelectedIndexChanged="show" />
<p><asp:label id="lbldisplay" runat="server" /></p>
</form>

</body>
</html>




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
How to bind XML in radio button list  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Xml Overview
Previous Resource: Xml Interview Questions
Return to Discussion Resource Index
Post New Resource
Category: XML


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use