摘要: 原文:http://damieng.com/blog/2009/11/06/multiple-outputs-from-t4-made-easy-revisitedUsageInitializationYou’ll need to get the code into your template – ... 阅读全文
posted @ 2015-02-16 18:26 英雄饶命啊 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 上传文件时必须验证是否已登入。当用FormsAuthentication做登入,使用FormsAuthentication.FormsCookieName进行验证是否已登入即可。 [HttpPost] public string Upload(HttpPostedFile... 阅读全文
posted @ 2015-02-15 11:04 英雄饶命啊 阅读(191) 评论(0) 推荐(0) 编辑
摘要: ViewData 和 ViewBag都是页面级别的生命周期,TempData--Passing data between the current and next HTTP requestsTempData默认是实现方式--存在session中,所以结论很简单,能不用就不用。。要么负载时就麻烦了。P... 阅读全文
posted @ 2015-01-24 20:27 英雄饶命啊 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 通过 AntiForgeryWorker的GetHtml()方法生成html --input hide元素--value=要验证的值,并生成cookie--用于保存需要验证的值。类中的AntiForgeryDataSerializer--用作序列化与反序列化验证的值。internal class A... 阅读全文
posted @ 2015-01-24 19:17 英雄饶命啊 阅读(523) 评论(0) 推荐(0) 编辑
摘要: http://msdn.microsoft.com/zh-cn/data/jj591620Configuring a Required-to-Optional Relationship (One-to–Zero-or-One)The following example configures a on... 阅读全文
posted @ 2015-01-09 14:43 英雄饶命啊 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 调用: DataTable table = new DataTable(); #region 创建 datatable table.Columns.Add(new DataColumn("账号", typeof(string))); ... 阅读全文
posted @ 2014-08-13 17:31 英雄饶命啊 阅读(171) 评论(0) 推荐(0) 编辑
摘要: table:1.var tables = [];var len = data.length;var rowNum = 3;var sumRows = len % rowNum;var sumRowMod = len / rowNum;var rows = (sumRows == 0 ? sumRow... 阅读全文
posted @ 2014-04-14 15:25 英雄饶命啊 阅读(512) 评论(0) 推荐(0) 编辑
摘要: public class ThreadTest { /* * 1.由于工作窃取(work-stealing)队列而发起了大量任务, * 那么Task提供了比ThreadPool.QueueUserWorkItem或者 * 一个委托的... 阅读全文
posted @ 2014-04-10 11:10 英雄饶命啊 阅读(144) 评论(0) 推荐(0) 编辑
摘要: How to choose the right WCF bindingConsider the following scenarios:• If you need to support clients over the Internet, consider using wsHttpBinding.•... 阅读全文
posted @ 2014-04-10 11:06 英雄饶命啊 阅读(232) 评论(0) 推荐(0) 编辑
摘要: table 变量的行为类似于局部变量,有明确定义的作用域。该作用域为声明该变量的函数、存储过程或批处理。在存储过程中使用 table 变量与使用临时表相比,减少了存储过程的重新编译量涉及表变量的事务只在表变量更新期间存在。这样就减少了表变量对锁定和记录资源的需求。另外,由于表变量作用域有限,并且不是... 阅读全文
posted @ 2014-04-10 11:04 英雄饶命啊 阅读(324) 评论(0) 推荐(0) 编辑