非淡泊无以明志,非宁静无以致远 -心静如止水,动于静
上一页 1 2 3 4 5 6 7 8 9 10 ··· 19 下一页
摘要: 我今天在做项目时也遇到这样的问题,在博客园中有找到合理的解释。注:这一bug在MVC4已经得到修复。不必指定最后的参数以下摘自:http://www.cnblogs.com/FoundationSoft/archive/2012/03/01/2376101.html在一个人员信息的View中,称为PersonView,调用了另外一个partial view,用来显示人员专业资质,称为QualificationView.PersonView的model类型为Person, QualificationView的model类型为IEnumerable。Person类有一个类型为List的属性qual 阅读全文
posted @ 2013-06-21 22:03 烟雨客 阅读(2062) 评论(1) 推荐(1) 编辑
摘要: 方法一:利用CSS将column设成隐藏footerStyle :"table-footer",...grid.Column(null,null, style:"nodisplay",...方法二:用input type=hidden@{ var grid =newWebGrid(Model); @grid.GetHtml(columns: grid.Columns(grid.Column(null,null, format: @), grid.Column("Title","Title")));}以上两种并不能将 阅读全文
posted @ 2013-06-19 21:43 烟雨客 阅读(1382) 评论(0) 推荐(0) 编辑
摘要: additionalViewData顾名思义是ViewData中的额外数据,ViewData是一个Dictionary, 所以当你想用自己的模板render时,又想传入模板额外的数据时,可以写成:Html.Editor("fieldName", "mytemplate", new {addtionaldata="data"). 然后在自己的模板中mytemplate中就可以用ViewData["addtionaldata"]来获得"data"字符串了。我做的一个项目中,因为View中的Model 阅读全文
posted @ 2013-06-19 21:31 烟雨客 阅读(1401) 评论(0) 推荐(0) 编辑
摘要: http://sywxy.iteye.com/blog/1317750数组可以被foreach语句遍历数组中的元素,原因是数组可以按需提供一个叫做枚举数(enumerator)的对象.枚举数可以依次返回请求的数组的元素.对于有枚举数的类型而言,必须有一个方法来获取它们.在.NET中获取一个对象枚举数的标准用法是调用对象的GetEnumerator方法.实现GetEnumerator方法的类型叫做可枚举类型(enumerable),数组就是可枚举类型.要注意枚举数(enumerator)和可枚举类型(enumerable)的区别和联系.枚举数是可以依次返回集合项的类对象,可枚举类型是带有GetE 阅读全文
posted @ 2013-06-08 21:14 烟雨客 阅读(497) 评论(0) 推荐(0) 编辑
摘要: http://www.code-magazine.com/article.aspx?quickid=0712052&page=1For years developers have been asking for query over data contained in a DataSet in a way that supports the expressiveness needed by today’s data-centric .NET applications. As part of the .NET framework 3.5, Microsoft® will int 阅读全文
posted @ 2013-06-08 20:46 烟雨客 阅读(336) 评论(0) 推荐(0) 编辑
摘要: /// <summary>/// References:/// </summary>private void RenderReport() { LocalReport localReport = new LocalReport(); localReport.ReportPath = Server.MapPath("~/Report.rdlc"); //A method that returns a collection for our report //Note: A report can have multiple data sources Lis 阅读全文
posted @ 2013-05-26 14:08 烟雨客 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 1.函数声明会覆盖变量声明,但不会覆盖变量赋值,为了解释这个,我们来看一个例子:function value(){ return 1;}var value;alert(typeof value); //"function"但如果该变量value赋值了,那结果就完全不一样了:function value(){ return 1;}var value = 1;alert(typeof value); //"number"该value赋值以后,变量赋值初始化就覆盖了函数声明。2. 变量声明在进入执行上下文就完成了3.所有的函数声明都在执行代码之前都已经完成了声 阅读全文
posted @ 2013-04-21 11:11 烟雨客 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 在使用@Html.BeginForm时,想即传递参数,又要设置form的一些其它属性怎么写呢?如下写法:@using(Html.BeginForm(null,null, new {returnUrl="login"}, FormAction.post, new {id="login", otherattr = "value"})){ ....}Render到 客户端 的html是:<form method="post" id="login" action="/home/login 阅读全文
posted @ 2013-04-19 19:36 烟雨客 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 1. 写css的时候,发现在同一个css文件中,以ID命名的css要比以class命名的css优先级高。如<html><head><style> #high{ background-color:red; width:240px; height:300px; } .low{ background-color:blue; width:240px; height:300px; }</style></head><body> <div id="high" class="low">H 阅读全文
posted @ 2013-04-19 18:55 烟雨客 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 1. 如果在用jQuery.Ajax()时,想屏蔽掉AjaxStart等事件,可以在参数中加global:false. 也可以用jQuery.unbind("AjaxStart.xxxx")来暂时disable掉,这里有一个概念就是事件命名空间。例如 $("button").bind("click.mybutton", function(){}) ; 会将函数挂在click事件处理链中,那么如果想将此事件处理函数从连中去掉,又不想将整个链删除,就可以用命名空间。$("button").unbind("cl 阅读全文
posted @ 2013-04-18 22:11 烟雨客 阅读(119) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 19 下一页