呵呵,我也是菜鸟,正在做这个下面是我做的 Session("id") = TextBox1.Text这个是为下个页面用的 Dim name As String name = Server.MapPath("财管.mdb") Dim lian As OleDbConnection = New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" & name)连接到access数据库(2000) lian.Open() Dim ming As String ming = "select 用户,密码,昵称 from 用户 where 用户='" + TextBox1.Text + "'and 密码='" + TextBox2.Text + "'"
当用户是textbox1,密码是textbox2与数据库中内容相符合 Dim rd As OleDbDataAdapter = New OleDbDataAdapter(ming, lian) Dim sunset As DataSet = New DataSet rd.Fill(sunset, "用户") Session("nicheng") = sunset.Tables("用户").Rows(0)(2).ToString lian.Close() Response.Redirect("主页.aspx")
里面有两个textbox控件,两个按钮
第一次给人回答问题,不知道明白没