<%@ Page Language="VB" %>
<!DOCTYPE html>
<script runat="server">
Dim sds As SqlDataSource = New SqlDataSource(Dao.ConnectionString, "select count(*) from t_user where username = @username and userpass = @userpass")
Protected Sub Page_Load(sender As Object, e As EventArgs)
Response.Cookies("username").Value = ""
Response.Cookies("userpass").Value = ""
End Sub
Protected Sub Login1_Authenticate(sender As Object, e As AuthenticateEventArgs) Handles Login1.Authenticate
Dim username As String = Me.Login1.UserName
Dim userpass As String = Me.Login1.Password
sds.SelectParameters.Add("username", username)
sds.SelectParameters.Add("userpass", userpass)
If DirectCast(sds.Select(DataSourceSelectArguments.Empty), System.Data.DataView)(0)(0) Then 'CT
http://localhost:49252/WebSite/Default.aspx控件login1去掉了过滤空格和转换小写
最新推荐文章于 2019-02-16 01:16:19 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)