我有一个表单在打印此表单时更新数据库。由于某些原因,我提交表单时我没有回复帖子
ASP:
' -----------------------------------------------------------------------------
' update form as printed
' -----------------------------------------------------------------------------
If IsPostBack Then
Dim dtrw3 As DataRow
For Each dtrw3 In ds.Tables(3).Rows
Update_As_Printed(dtrw3("frm_trans_id"))
Next
End If
.......
some stuff
.........
conSql.Close()
的Javascript
function printpage() {
window.print();
document.forms["frm_trans"].submit();
}
HTML
<form runat="server" id="frm_trans">
<center>
<table class='noprint' >
<tr>
<td align=center>
<input type='button' name='button_print' value="Print and Mark As Printed" onclick="javascript:printpage()"><br>
</td>
</tr>
</table>
............................
............................
............................
</form>