Ch16-04-01.aspx 使用Repeater控件显示记录
' 在这里设置联机字符串的内容
Sub Page_Load(Obj As Object, e As EventArgs)
If Not IsPostBack Then
Dim DSN As String
Dim tSQL As String = "Select * From UserDatas"
Dim OBJConn As OleDbConnection
DSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("/ASP/chap14/ASP.NET网页数据库.mdb") & ";"
OBJConn = New OleDbConnection(DSN)
OBJConn.Open()
Dim OBJCmd As OleDbCommand = New OleDbCommand(tSQL, OBJConn)
RepeaterCTL.DataSource = OBJCmd.ExecuteReader()
RepeaterCTL.DataBind()
OBJConn.Close()
End If
End Sub
使用Repeater控件显示记录
编号登录账号密码
姓名电子邮件信箱