日期:2014-05-17  浏览次数:20546 次

.net中使用上传控件jq uploadify求解决方法
前台上传部分主要代码:
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
  <td>照片日期:</td>
  <td><asp:TextBox ID="txtPicDate" runat="server" ></asp:TextBox></td>
  </tr>
  <tr>
  <td>照片标题:</td>
  <td><asp:TextBox ID="txtPicTitle" runat="server" Width="80%" 
  ValidationGroup="vgPicValidation" MaxLength="15"></asp:TextBox></td>
  </tr>
  <tr>
  <td style="width:15%">添加照片:</td>
  <td>
  <div id="fileQueue"></div>  
  <input type="file" name="uploadify" id="uploadify"/>  
  <p>  
  <a href="javascript:$('#uploadify').uploadifyUpload()">上传</a>|<a href="javascript:$('#uploadify').uploadifyClearQueue()">取消上传</a>
  </p>
  </td>
  </tr>
  <tr>
  <td>照片简介:</td>
  <td><asp:TextBox ID="txtDescription" runat="server" Height="134px" 
  TextMode="MultiLine" Width="80%"></asp:TextBox>
  <input id="hidStudentNo" type="hidden" runat="server"/>
  </td>
  </tr>
  </table> 

想实现把上传的照片保存到数据库中,数据库中对应着两张表tb1、tb2,tb1表中存放的是照片的主题(title)、(描述)description、和照片的id(以字符串形式连接),照片表tb2存放的是照片的基本信息,id,picname等等。
问题是根据jq uploadify官方的例子我只能对UploadHandler.ashx进行操作把照片的基本信息存放到tb2表中,不知道该如何把页面上照片对应的信息、描述等存放到tb1中,请高人指点给出解决思路,有demo代码更好,先谢了

------解决方案--------------------
参考
------解决方案--------------------
我自己的解决决办法是使用seesion~, 在ashx文件里用session把文件名字拿下来, 然后再提交页面里在取出存入到数据库中