是这样的吗?前台 more.aspx?type=...后台 Sub moreproduct() Dim type As String = Request.QueryString("type") Dim strsql As String = "select * from products where typeid='" & type & "'" Dim cmd As New SqlCommand(strsql, conn) Dim adp As New SqlDataAdapter(cmd) Dim ds As New DataSet adp.Fill(ds, "products") datalist1.DataSource = ds datalist1.DataBind() End Sub
more.aspx?type=2
more.aspx?type=3
more.aspx?type=4
more.aspx?type=5根据不同的值用不同的sql语句
more.aspx?type=...后台
Sub moreproduct()
Dim type As String = Request.QueryString("type")
Dim strsql As String = "select * from products where typeid='" & type & "'"
Dim cmd As New SqlCommand(strsql, conn)
Dim adp As New SqlDataAdapter(cmd)
Dim ds As New DataSet
adp.Fill(ds, "products")
datalist1.DataSource = ds
datalist1.DataBind()
End Sub