/ Published in: VB.NET
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
' must include: Imports System.Web.HttpContext Dim DS As New DataSet() Dim FilePath As String ''AspEnableParentPaths = True 'FilePath = Server.MapPath("~/App_Data/tlkpCodeValues.xml") FilePath = Current.Server.MapPath("App_Data\tlkpCodeValues.xml") DS.ReadXml(FilePath) Dim I As Integer strddl.Items.Clear() ' Display the result For I = 0 To DS.Tables(0).Rows.Count - 1 If DS.Tables(0).Rows(I).Item("CodeType") = strObjParm Then Dim newListItem As New ListItem newListItem.Value = DS.Tables(0).Rows(I).Item("Code_Val") newListItem.Text = DS.Tables(0).Rows(I).Item("ShortDescText") strddl.Items.Add(newListItem) End If Next strddl.Items.Insert(0, New ListItem("--Choose One--"))