asp表单提交问题

来源:百度知道 编辑:UC知道 时间:2024/05/05 06:19:22
谁有表单提交与表单验证在同一个页面处理的代码?????? (最好是整页)
和需要注意的地方.

<!--#include file="inc/conn.asp"-->
<!--#include file="../top.asp"-->

<%if session("admin")="" and session("pwd")="" then
response.write"<script>window.open('login.asp','_parent')</script>"
end if%>

<%
dim sql,rs,flag,m,strCity,city,strSql,strSearch

flag=0
ii=1
strCity=request.QueryString("city")
'if request.Form(frmSearch).txtName.text<>"" then
'strSearch=request.Form(frmSearch).txtName.text
'else
'strSearch=

if strCity="changchun" then
sql="select * from changchun"
'strSql="select * from changchun where 姓名=" & strSearch
city="长春"
end if

if strCity="jilin" then
sql="select * from jilin"
city="吉林"