该文被密码保护。 阅读全文
posted @ 2013-09-27 18:15 weych 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 第一:添加一个程序集引用第二:在代码中引用 using Microsoft.Office.Interop.Excel第三:在事件中引用如下方法protected void ExportExcel(System.Data.DataTable dt) { int s = 0; if (dt == null || dt.Rows.Count == 0) return; Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application(); if (xlApp == nul 阅读全文
posted @ 2013-08-22 16:34 weych 阅读(378) 评论(0) 推荐(0) 编辑
摘要: 我个人理解,瀑布流就是开始加载多少条,然后再通过scroll事件追加加载数据,我说的可能不好理解,具体结合代码应该能看懂,如果我理解的不好请多多包涵。css代码:View Code 1 <style type="text/css" > 2 .body{ background-color:#eee;}3 #main{ background-color:White; width:920px; margin:0 auto;}4 .item{width:225px; float:left; display:inline; margin-right:5px; margin 阅读全文
posted @ 2012-12-20 16:06 weych 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 流方式下载View Code 1 //string fileName = "file/s.txt"; //定义文件的路径 2 //string filePath = Server.MapPath(fileName); //将指定的虚拟路径转换成物理路径 3 ////以字符流的形式下载文件 4 //FileStream fs = new FileStream(filePath,FileMode.Open); 5 //byte[] bt = new byte[(int)fs.Length]; 6 //fs.Read(bt,0,bt.Length); 7 //fs.Close() 阅读全文
posted @ 2012-12-12 14:29 weych 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 第一步:在页面中要应用命名空间 using System.Web.Mail;第二步:编写代码一下代码View Code 1 //创建一个附件对象 2 MailAttachment objMail = new MailAttachment("C:\\Documents and Settings\\Administrator\\桌面\\nicpetshop创建项目的步骤.txt"); 3 //创建一个消息对象 4 MailMessage mail = new MailMessage(); 5 //收信人地址 6 mail.To = ""; 7 //发信人地址 阅读全文
posted @ 2012-12-10 16:32 weych 阅读(116) 评论(0) 推荐(0) 编辑
摘要: css样式View Code 1 <style type="text/css"> 2 #main 3 { 4 margin: 0 auto; 5 width: 950px; 6 height: 150px; 7 } 8 #prev 9 {10 width: 20px;11 height: 150px;12 line-height: 150px;13 margin: 0;14 padding: 0;15 float: left;16 margin-right: 30px;17 }18 #next19 {20 width: 20px;21 height: 150px 阅读全文
posted @ 2012-11-30 10:55 weych 阅读(117) 评论(0) 推荐(0) 编辑
摘要: View Code 1 using System; 2 using System.Collections; 3 using System.Configuration; 4 using System.Data; 5 using System.Linq; 6 using System.Web; 7 using System.Web.Security; 8 using System.Web.UI; 9 using System.Web.UI.HtmlControls; 10 using System.Web.UI.WebControls; 11 using System.Web.... 阅读全文
posted @ 2012-11-19 17:18 weych 阅读(995) 评论(3) 推荐(0) 编辑
摘要: View Code 1 public partial class _Default : System.Web.UI.Page 2 { 3 List<ModelsInfo> list = Models.GetItems(); //获取该表中全部信息 4 protected void Page_Load(object sender, EventArgs e) 5 { 6 7 if (!IsPostBack) 8 { 9 loadData(); //加载数据10 }11 }12 ... 阅读全文
posted @ 2012-11-16 16:26 weych 阅读(289) 评论(0) 推荐(0) 编辑