表单代码: 如何提交到SQL2000数据库,请帖代码,给全分

tzp250451131 2010-11-16 08:59:23
表单代码: 如何提交到SQL2000数据库,请帖代码,给全分
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RepairMain.aspx.cs" Inherits="Repair_RepairMain" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>RepairBill</title>
<meta name="Copyright" content="" />
<meta name="description" content="维修表单提交页面" />
<meta content="JavaScript,Ajax" name="keywords" />
<style type="text/css">
<!--
body {
font-family: Arial, Helvetica, sans-serif;
font-size:12px;
color:#666666;
background:#fff;
text-align:center;

}

* {
margin:0;
padding:0;
}

a {
color:#1E7ACE;
text-decoration:none;
}

a:hover {
color:#000;
text-decoration:underline;
}
h3 {
font-size:14px;
font-weight:bold;
}

pre,p {
color:#1E7ACE;
margin:4px;
}
input, select,textarea {
padding:1px;
margin:2px;
font-size:11px;
}
.buttom{
padding:1px 10px;
font-size:12px;
border:1px #1E7ACE solid;
background:#D0F0FF;
}
#formwrapper {
width:450px;
margin:15px auto;
padding:20px;
text-align:left;
border:1px #1E7ACE solid;
}

fieldset {
padding:10px;
margin-top:5px;
border:1px solid #1E7ACE;
background:#fff;
}

fieldset legend {
color:#1E7ACE;
font-weight:bold;
padding:3px 20px 3px 20px;
border:1px solid #1E7ACE;
background:#fff;
}

fieldset label {
float:left;
width:120px;
text-align:right;
padding:4px;
margin:1px;
}

fieldset div {
clear:left;
margin-bottom:2px;
}

.enter{ text-align:center;}
.clear {
clear:both;
}

-->
</style>
<SCRIPT language="javascript" author=zp>
<!--
function initArray(){for(i=0;i<initArray.arguments.length;i++)
this[i]=initArray.arguments[i];}var isnMonths=new initArray("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月");var isnDays=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日");today=new Date();hrs=today.getHours();min=today.getMinutes();sec=today.getSeconds();clckh=""+((hrs>12)?hrs-12:hrs);
clckm=((min<10)?"0":"")+min;clcks=((sec<10)?"0":"")+sec;clck=(hrs>=12)?"下午":"上午";var stnr="";var ns="0123456789";var a="";
//-->
</SCRIPT>

</head>

<body>

<img src="Repair_Source/mm_health_photo.jpg" alt="Header image" width="600" height="101" border="0" />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#D5EDB3">

</tr>

<tr>
<td colspan="4" bgcolor="#5C743D"><img src="Repair_Source/mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
</tr>
<tr>
<td colspan="4" bgcolor="#99CC66" background="Repair_Source/mm_dashed_line.gif" style="height: 3px"><img src="Repair_Source/mm_dashed_line.gif" alt="line decor" width="4" height="3" border="0" /></td>
</tr>
<tr bgcolor="#99CC66">
<td style="height: 20px"></td>
<a href="javascript:;">HOME</a>; ::  
<td colspan="3" bgcolor="#99CC66" id="dateformat" style="height: 20px">
<script language="JavaScript" type="text/javascript">
document.write(TODAY);function submit_onclick() {

}

</script></td>
</tr><tr>
<td colspan="4" bgcolor="#99CC66" background="Repair_Source/mm_dashed_line.gif"><img src="Repair_Source/mm_dashed_line.gif" alt="line decor" width="4" height="3" border="0" /></td>
</tr>

<tr>
<td colspan="4" bgcolor="#5C743D" style="height: 2px"><img src="Repair_Source/mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
</tr>
</table>
<div id="formwrapper">
<form action="VBScript.vbs" method="post" name="apForm" id="apForm">
<fieldset>
<legend>报修单编号
</legend>
<p align="center"><strong>设备维修报修单 </strong></p>
<div>
<label for="dept">部门</label>
<select name="dept" id = "dept" size="1" >
<option value="1">a</option>
<option value="2">b</option>
<option value="3">c</option>
<option value="4">d</option>
<option value="5">e</option>
<option value="6">f</option>
<option value="7">g</option>
<option value="8">h</option>
<option value="9">i</option>
</select>
<br />
</div>
<div>
<label for="user_name">使用人</label>
<input type="text" name="user_name" id="user_name" value="" size="18" maxlength="150" />

*<br />
</div>
<div>
<label for="occ_data">发生日期</label>
<input type="text" name="occ_data" id="occ_data" size="18" maxlength="15" />
*<br />
</div>
<div>
<label for="ip_adress">IP地址</label>
<input type="text" name="ip_adress" id="ip_adress" size="18" maxlength="15" />
<br />
<br />
</div>
<div>
<label for="phone_number">电话号码</label>
<input type="text" name="phone_number" id="phone_number" size="18" maxlength="15" />
<br />
<br />
</div>
<div>
<label for="ploblem_describe">问题描述</label>
<textarea name ="ploblem_describe" cols="40" rows="3" ></textarea>
</div>
<div class="enter">
<input name="create791" type="submit" class="buttom" value="提交" id="Submit1" onclick="return Submit1_onclick()" />
<input name="Submit" type="reset" class="buttom" value="重置" />
</div>

<p align="center"><strong>*号字段为必须要填写的字段</strong></p>
<SCRIPT language=javascript>
<!--
function getFullYear(d){//d is a date object
yr=d.getYear();if(yr<1000)
yr+=1900;return yr;}
// document.write("<table width=486>");//don’t delete this line
document.
document.write(isnDays[today.getDay()]
+","+isnMonths[today.getMonth()]+""+today.getDate()+"日,"
+getFullYear(today)+"年<P>");
// document.write("</table>"); // don’t delete this line
//-->
</SCRIPT>
</fieldset>
</form>
</div>
<br><br>
<div align="center">
</div>
</body>
</html>

如何提交到SQL数据库表:t,对应字段 z1,z2,z3,z4 -- 请帖部分代码 给全分
...全文
111 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
sy_binbin 2010-11-16
  • 打赏
  • 举报
回复
http://topic.csdn.net/u/20101115/16/cd1eb7d4-eac1-4191-b63a-2338fff05677.html


你看看我在这里给你的回复
flyerwing 2010-11-16
  • 打赏
  • 举报
回复
直接用数据库做数据处理?
新东西吧.
tzp250451131 2010-11-16
  • 打赏
  • 举报
回复
能给个例子程序吗?多谢
孟子E章 2010-11-16
  • 打赏
  • 举报
回复
看看.net的文档,里面的代码多的是

111,120

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧