web 2.0

ASP.NET(vb.net) & XML BindData DropDownList

ASP.NET(vb.net) & XML BindData DropDownList - The in this article we will show example scripts ASP.NET how to BindData XML to  DropDownList.

ShotDev Focus:
- ASP.NET(vb.net) & XML BindData DropDownList

Example

AspNetXmlDropDownList.aspx

<%@ Import Namespace="System.Data"%>
<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim ds As New DataSet
ds.ReadXml(MapPath("XML/customer.xml"))

'*** DropDownlist ***'
With Me.myDDL1
.DataSource = ds
.DataTextField = "Name"
.DataValueField = "CustomerID"
.DataBind()
End With

End Sub
</script>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form id="form1" runat="server">
<asp:DropDownList id="myDDL1" runat="server"></asp:DropDownList>
</form>
</body>
</html>

Screenshot

ASP.NET(vb.net) & XML BindData DropDownList
.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.