你可以定义两个参数,或是直接写为
strSql="select * from userinfo where
loginname='" & textBox1.text &'"and password='" & textBox2.text&'";
strSql="select * from userinfo where
loginname='" & textBox1.text &'"and password='" & textBox2.text&'";
<%
dim uname,upass,strsql
dim rs if request("username")="" and request("password")="" then
Response.Redirect("login.asp?id=error")
else
Uname=request("username")
Upass=request("password") rs= Server.CreateObject("ADODB.Recordset")
strSql="select * from userinfo where loginname='"&uname&"' and password='"&Upass&"' "
rs.open(strSql,Conn,1,1)
if rs.eof then
response.Write("user not exists!")
else
end if
end if rs.Close
rs=nothing Conn.Close
Conn = nothing
%>
http://community.csdn.net/Expert/topic/3098/3098442.xml?temp=.2217676
首先看看你的wen.config有没有
<configuration>
<system.web>
<globalization fileEncoding="gb2312" requestEncoding="gb2312" responseEncoding="gb2312" />
</system.web>
</configuration>
如果有了就 按 三楼说的 去 找个变量代替一下参考一下我的代码
我确实没有 web.config,我该去哪找?谢谢
<configuration>
<system.web>
<globalization fileEncoding="gb2312" requestEncoding="gb2312" responseEncoding="gb2312" />
</system.web>
</configuration>
加进去就ok了
<system.web>
<globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
</configuration>
类似这个的有吧,在最低下
不用管别的,把 utf-8 ---->gb2312 is ok