Dim UserName As String = e.Cookies("username") '从cookie中获取用户名
Dim Password As String = e.Cookies("password") '从cookie中获取用户密码
If e.Path = "logon.htm" '如果是通过登录页面访问,从PostValues即可中提取用户名和密码
If e.PostValues.ContainsKey("username") AndAlso e.PostValues.ContainsKey("password") Then
UserName = e.PostValues("username")
Password = e.PostValues("password")
End If
End If
dim dr as datarow = DataTables("用户表").find("username='" & e.PostValues("username") & "'")
if dr isnot nothing then
Verified = ( Password = dr("password"))
ElseIf Username = "李四" AndAlso Password="999" Then
Verified = True
else
Verified = false
end if