<%@ Language=VBScript %>
<% Response.Expires=0 %>
<% session.timeout=30
%>
<!--#include virtual="/conn.asp" -->
<head>
<LINK href="/cssfile/1.css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>公司网站信息维护界面</title>
</head><body>
<%
if Request.Form("button")="增加" then
Response.Write Request.Form("button")
string wzmc=request.Form("textwzmc");
string wzdz=request.Form("textwzdz");
string wzsm=request.Form("textwzsm");
Response.Write wzmc
Response.Write wzdz
Response.Write wzsm
sql = "insert into WZXXB(wzmc,wzdz,wzsm) values('" + wzmc + "','" + wzdz + "','" + wzsm + "')";
cmd.commandtext=sql
cmd.execute
Response.Write("添加成功");
end if
if Request.Form("button")="修改" then
Response.Write "xiugai"
string wzmc=Request.Form("textwzmc");
string wzdz=Request.Form("textwzdz");
string wzsm=Request.Form("textwzsm");
sql = "delete from wzxxb where wzmc = '" + wzmc + "'";
cmd.commandtext=sql
cmd.execute
end if
if Request.Form("button")="删除" then
Response.Write "shanchu"
string wzmc=Request.Form("textwzmc");
string wzdz=Request.Form("textwzdz");
string wzsm=Request.Form("textwzsm");
sql = "delete from wzxxb where wzmc = '" + wzmc + "'";
cmd.commandtext=sql
cmd.execute
end if
%>
<form method="post" name="weihu" action="">
<table width="400" border="0" align="center">
<caption align="top">
网站基本信息维护
</caption>
<tr>
<td width="78" height="79">网站名称</td>
<td colspan="2"><label>
<input name="textwzmc" type="text" id="textwzmc">
</label></td>
</tr>
<tr>
<td height="84">网站地址</td>
<td colspan="2"><label>
<input name="textwzdz" type="text" id="textwzdz">
</label></td>
</tr>
<tr>
<td height="91">网站说明</td>
<td colspan="2"><label>
<textarea name="textwzsm" id="textwzsm"></textarea>
</label></td>
</tr>
<tr>
<td height="63"><label>
<div align="right">
<input name="button" type="submit" id="button" value="增加">
</div>
</label></td>
<td width="142"><label>
<div align="center">
<input name="button" type="submit" id="button" value="修改">
</div>
</label></td>
<td width="158"><label>
<div align="center">
<input name="button" type="submit" id="button" value="删除">
</div>
</label></td>
</tr>
</table>
</form>
</body>
</html>
点击增加按钮,无法执行增加,连接本的页面输出语句Response.Write Request.Form("button")都无法执行,是我哪里写错了么,还是什么别的问题啊,郁闷,期盼高手的解决。
<% Response.Expires=0 %>
<% session.timeout=30
%>
<!--#include virtual="/conn.asp" -->
<head>
<LINK href="/cssfile/1.css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>公司网站信息维护界面</title>
</head><body>
<%
if Request.Form("button")="增加" then
Response.Write Request.Form("button")
string wzmc=request.Form("textwzmc");
string wzdz=request.Form("textwzdz");
string wzsm=request.Form("textwzsm");
Response.Write wzmc
Response.Write wzdz
Response.Write wzsm
sql = "insert into WZXXB(wzmc,wzdz,wzsm) values('" + wzmc + "','" + wzdz + "','" + wzsm + "')";
cmd.commandtext=sql
cmd.execute
Response.Write("添加成功");
end if
if Request.Form("button")="修改" then
Response.Write "xiugai"
string wzmc=Request.Form("textwzmc");
string wzdz=Request.Form("textwzdz");
string wzsm=Request.Form("textwzsm");
sql = "delete from wzxxb where wzmc = '" + wzmc + "'";
cmd.commandtext=sql
cmd.execute
end if
if Request.Form("button")="删除" then
Response.Write "shanchu"
string wzmc=Request.Form("textwzmc");
string wzdz=Request.Form("textwzdz");
string wzsm=Request.Form("textwzsm");
sql = "delete from wzxxb where wzmc = '" + wzmc + "'";
cmd.commandtext=sql
cmd.execute
end if
%>
<form method="post" name="weihu" action="">
<table width="400" border="0" align="center">
<caption align="top">
网站基本信息维护
</caption>
<tr>
<td width="78" height="79">网站名称</td>
<td colspan="2"><label>
<input name="textwzmc" type="text" id="textwzmc">
</label></td>
</tr>
<tr>
<td height="84">网站地址</td>
<td colspan="2"><label>
<input name="textwzdz" type="text" id="textwzdz">
</label></td>
</tr>
<tr>
<td height="91">网站说明</td>
<td colspan="2"><label>
<textarea name="textwzsm" id="textwzsm"></textarea>
</label></td>
</tr>
<tr>
<td height="63"><label>
<div align="right">
<input name="button" type="submit" id="button" value="增加">
</div>
</label></td>
<td width="142"><label>
<div align="center">
<input name="button" type="submit" id="button" value="修改">
</div>
</label></td>
<td width="158"><label>
<div align="center">
<input name="button" type="submit" id="button" value="删除">
</div>
</label></td>
</tr>
</table>
</form>
</body>
</html>
点击增加按钮,无法执行增加,连接本的页面输出语句Response.Write Request.Form("button")都无法执行,是我哪里写错了么,还是什么别的问题啊,郁闷,期盼高手的解决。
或者把这个html按钮删了,换成服务器端的