快速业务通道

asp.net关于文件在数据库的存入和读取

作者 佚名技术 来源 NET编程 浏览 发布时间 2012-05-21
;>&nbsp;</td>
132     <td>&nbsp;</td>
133    </tr>
134    <tr>
135     <td><img src="../Images/ye_r3_c1.gif" alt="" name="ye_r3_c1" width="11" height="22" border="0" id="ye_r3_c1" /></td>
136     <td colspan="2" background="../images/ye_r3_c2.gif">&nbsp;</td>
137     <td><img src="../Images/ye_r3_c3.gif" alt="" name="ye_r3_c3" width="12" height="22" border="0" id="ye_r3_c3" /></td>
138     <td>&nbsp;</td>
139    </tr>
140   </table>
141  </div>
142  </form>
143</body>
144</html>
145

SendEmail.aspx.cs

 1using System;
  2using System.Data;
  3using System.Configuration;
  4using System.Collections;
  5using System.Web;
  6using System.Web.Security;
  7using System.Web.UI;
  8using System.Web.UI.WebControls;
  9using System.Web.UI.WebControls.WebParts;
10using System.Web.UI.HtmlControls;
11
12using System.Data;
13using System.Data.SqlClient;
14using EOffice.Model;
15using EOffice.SqlServer;
16using System.IO;
17using System.Configuration;
18
19//using iWebSMS2000;
20[Serializable]
21public partial class GroupWork_SendEmail : System.Web.UI.Page
22{
23  public SqlConnection conn;
24  //public iSMS2000 SMS;
25  //public DBstep.SMSClient2000 ObjiSMSClient2000;
26  protected void Page_Load(object sender, EventArgs e)
27  {
28    conn = new SqlConnection("SERVER=SERVER;UID=sa;PWD=8860;database=EOFFICE_SERVER;");
29   
30  }
31  protected void btnSubmit_Click(object sender, EventArgs e)
32  {
33    String strTitle = txtTitle.Text;
34    String strContent = txtContent.Text;
35    UserInfo info = (UserInfo)Session["EOfficeUserInfo"];
36    String strUserName = info.UserName;
37    String strTmpDept = info.DeptId.ToString();
38
39    String strUnitName = ConfigurationSettings.AppSettings["UnitName"];
40    String strServerFileIndex = "";  //捲暦匂極猟周現周沫哈
41    String strClientFileIndex = "";  //人薩極猟周現周沫哈
42
43    String strRemote = HiddenField2.Value;
44    String[] strRemoteUser = strRemote.Split('','');
45    String strTmpUserName;
46    String strTmpServer;
47    Boolean bDone = false;
48
49    /**/////////貧勧謹現周旗鷹/////////////
50    //誼欺File燕汽圷殆
51    HttpFileCollection files = HttpContext.Current.Request.Files;
52    HttpPostedFile postedFile;
53
54    foreach (string strUser in strRemoteUser)
55    {
56      String[] strSplit = strUser.Split(''/'');
57      strTmpUserName = strSplit[0];
58      strTmpServer = strSplit[1];
59      String strConnectString = "";
60      String strAreaName

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号