List, data and data rods
ASP gives us a set of controls for data sheets and data lists. These controls help us customize our UI (User Interface User Interface) without considering a database or other database. For example: In the example below, we will introduce
<% @ Import namespace = "system.data"%>
<% @ Import namespace = "system.data.sql"%>
hEAD>
Sub Submitbtn_Click (Sender As Object, E AS Eventargs)
DIM DS AS Dataset
DIM MyConnection As SqlConnection
DIM MyCommand as SqldatasetCommand
'The following is a database link
MyConnection = New SqlConnection ("Server = localhost; uid = sa; pwd =; database = pubs")
Mycommand = new sqldatasetcommand ("Select * from titles where type = ' category.selectedItem.Value "' ", myconnection)
DS = new dataset ()
MyCommand.FillDataSet (DS, "Titles")
MyList.DataSource = ds.tables ("titles"). DefaultView
MyList.DATABIND ()
End Sub
script>