Partial Class Index
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Request.Cookies("username") Is Nothing Or Request.Cookies("userpass") Is Nothing Then
Response.Redirect("~/Default.aspx")
End If
Dao.sds.SelectCommand = "select count(*) from t_user where username = ? and userpass = ?"
Dao.sds.SelectParameters.Add(1, Request.Cookies("username").Value)
Dao.sds.SelectParameters.Add(2, Request.Cookies("userpass").Value)
If Dao.sds.Select(DataSourceSelectArguments.Empty)(0)(0) = 0 Then
Response.Redirect("~/Default.aspx")
End If
End Sub
End Class
http://localhost:50459/WebSite/Index.aspx.vb
最新推荐文章于 2024-08-08 20:41:43 发布