Imports System.Data Public Class Ch11DisplayProducts Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. Private Sub InitializeComponent() End Sub Protected WithEvents MyProdList As System.Web.UI.WebControls.DataList Protected WithEvents Label2 As System.Web.UI.WebControls.Label Protected WithEvents Panel1 As System.Web.UI.WebControls.Panel Protected WithEvents Label3 As System.Web.UI.WebControls.Label Protected WithEvents DropDownList1 As System.Web.UI.WebControls.DropDownList Protected WithEvents ImageButton1 As System.Web.UI.WebControls.ImageButton Protected WithEvents Image1 As System.Web.UI.WebControls.Image 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here If Not Page.IsPostBack() Then Dim MyHash As New Hashtable(6) MyHash.Add("Waterford Gifts for Men", 1) MyHash.Add("Waterford Gifts for Women", 2) MyHash.Add("Royal Tara Bone China", 5) MyHash.Add("Waterford Glassware", 7) MyHash.Add("Belleek Vases & Bowls", 9) MyHash.Add("Belleek Frames & Clocks", 10) DropDownList1.DataSource = MyHash DropDownList1.DataTextField = "Key" DropDownList1.DataValueField = "Value" Page.DataBind() Panel1.Visible = False Else Panel1.Visible = True Dim ProdID As Integer ProdID = CInt(DropDownList1.SelectedValue.ToString) Image1.ImageUrl = _ "http://localhost/Chapter11WebService/images/SubCatPics/" & _ DropDownList1.SelectedValue.ToString & ".jpg" ' Insert the code here End If End Sub End Class