我正在创建一个页面,我需要通过单选按钮接受/拒绝表格中的行,然后将数据行发送到SQL中的表格。
我已经被困在这几天了,我在网上找不到任何有用的信息,所以任何帮助都将不胜感激!
这是我的Html:
<div>
<form id="canceltable" onsubmit="" method="post" action="admin.asp">
<table id="CancelRequestTable">
<tr>
<td style="width: 200px;" />
<td style="width: 200px;" />
<td style="width: 200px;" />
<td style="width: 200px;" />
</tr>
<tr>
<th colspan="4">Cancel Request Table</th>
</tr>
<tr>
<td>Name</td>
<td>Start Date</td>
<td>End Date</td>
<td>Accept/Decline</td>
</tr>
<% Set objDBConn=S erver.CreateObject( "ADODB.Connection") objDBConn.Open "Provider=sqloledb;Data Source=*****\SQL2012;Initial Catalog=*****;User ID=****;Password=****;" Set objDBCommand=S erver.CreateObject( "ADODB.Command") objDBCommand.ActiveConnection=o bjDBConn objDBCommand.CommandText="spCancelRequestTable" objDBCommand.CommandType=a dCmdStoredProc Set objDBRS=S erver.CreateObject( "ADODB.RecordSet") objDBRS.open objDBCommand,,adOpenForwardOnly Do until objDBRS.eof %>
<tr>
<td class="Column4Table">
<%response.Write(objDBRS(0))%>
</td>
<td class="Column4Table">
<%response.Write(objDBRS(1))%>
</td>
<td class="Column4Table">
<%response.Write(objDBRS(2))%>
</td>
<td>
<input type="radio" name="radio<%=a%>" />
<input type="radio" name="radio<%=a%>" />
</td>
</tr>
<tr>
<%
a=a+1
objDBRS.movenext
Loop
Set objDBCommand=nothing
objDBConn.Close
Set objDBConn=nothing
%>
</tr>
</table>
<div id="ButtonSubmit2"> <strong><i>Submit</i></strong></div>
</form>
</div>
答案 0 :(得分:0)
您没有为单选按钮传递值属性。你想要这样的东西:
<form id="form1" name="form1" method="post">
<input type="radio" name="RadioGroup1" value="radio<%=sql1%>" id="RadioGroup1_0">
<input type="radio" name="RadioGroup1" value="radio<%=sql2%>" id="RadioGroup1_1">
</form>