Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
Default.aspx.vb
Package: UserManagement.rar [view]
Upload User: bhp852
Upload Date: 2022-07-12
Package Size: 22k
Code Size: 1k
Category:
.net
Development Platform:
Visual Basic
- Imports System.Data
- Imports System.Data.OleDb
- Partial Class _Default
- Inherits System.Web.UI.Page
- Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate
- Dim StrCnn As String
- Dim StrSql As String
- Dim Cnn As OleDbConnection
- Dim Cmd As OleDbCommand
- Dim Dr As OleDbDataReader
- StrCnn = "Provider= Microsoft.Jet.Oledb.4.0;Data Source=" + Server.MapPath("User.DMB.mdb")
- StrSql = "select * from usersheet where LoginName = '" + Login1.UserName + "' and userpass = '" + Login1.Password + "'"
- Cnn = New OleDbConnection(StrCnn) '连接数据库
- Cnn.Open()
- Cmd = New OleDbCommand(StrSql, Cnn)
- Dr = Cmd.ExecuteReader()
- If (Dr.Read()) Then '判断当前用户输入的用户名密码是否与数据库中有匹配
- Session("user") = Login1.UserName
- Response.Redirect(Login1.DestinationPageUrl)
- End If
- End Sub
- End Class