0

如何获取 poNo 文本框的值并将其更新到数据库。我尝试使用 ' request.Form("poNo") ' 获取值,但它没有用......

请帮忙!

<html>
<head>
<body>
  <%
     if(Request.ServerVariables("REQUEST_METHOD") = "POST") then
       updateInvoice = "Update unassignedinvoice set poNo='" & request.Form("poNo") & "')  where id=" & Request.QueryString("UO")
       adoConn.execute updateInvoice
     end if 
  %>

<form action="view_unapproved_invoices.asp?UO=<%response.Write(request.QueryString("UO"))%>"  enctype="multipart/form-data" method="POST">

  <% 
    invoicesSQL = "Select pono from unassignedinvoice where id = " & Request.QueryString("UO")
    set adoRSinvoices = Server.CreateObject("ADODB.Recordset")
    adoRSinvoices.open invoicesSQL, adoConn
  %>

  <table>
  <tr>
  <td style="text-align: left"> PO Number </td>
        <td> 
            <input id="poNo" type="text" value='<%=adoRSinvoices.fields("pono")%>' 
                align="right" /></td>
    </tr>
    <tr>
      <td> 
              <input id="Submit" align="right" type="submit" value="Upload" />  
       </td>
    </tr>
  </table> 

 </form>
</head>
</body>
</html>
4

1 回答 1

1

enctype="multipart/form-data"您在表单标签中指定的任何原因?

如果你删除它,它应该可以工作。

如果你需要,即。如果您在此页面上传文件,则必须根据您用于上传文件的组件访问表单字段

于 2014-07-27T08:29:25.870 回答