Relational DropDownList Using VB.NET Code Example. In this code, we illustrate three steps: Step 1. Copy and paste the code below on to the newly created aspx file Step 2. Add <appSettings> tag to the existing web.config Step 3. Make sure you have Northwind database install in your system
Contributed by aspfree Rating: / 120 July 16, 2003
<!-- ASPX Page --><!-- Step 1. Copy and paste the code below on to the newly created aspx file --><!-- Step 2. Add <appSettings> tag to the existing web.config --><!-- Step 3. Make sure you have Northwind database install in your system --><%@ Import Namespace="System.Data" %><%@ Import Namespace="System.Data.SqlClient" %> <SCRIPT language=VB runat="server">
Public Sub Page_Load(Source As Object, E As EventArgs)
If Not IsPostBack Then
Dim _Conn As SqlConnection Dim _Command As SqlCommand Dim _Reader As SqlDataReader Dim SQL As String