今天在修改一个bug是才发现SQL在比较两个字符串时会忽略掉字符串末尾的空格,即 'abc' 和 'abc ' 是相等的:
SELECT 'true' WHERE 'abc' = 'abc ' 会返回结果 true阅读全文>
发表于 @ 2008年05月13日 16:10:00|评论(loading...)|收藏
FormView的 OnDataBound事件的签名为 void FormView_DataBound((object sender, EventArgs e),事件参数中没有提供可供使用的数据源对象。
如何将数据源值绑定到某个下拉框选项?阅读全文>
发表于 @ 2008年05月08日 10:41:00|评论(loading...)|收藏
在一个RS报表中需要实现一年内各月份"报价总额"的统计,但是报价表中并不是每个月都有数据,某些月份没有数据,那么需要一个月份表(1-12月)并使用left join来连接报价表。如何用简单等方法生产一个月份表? 阅读全文>
发表于 @ 2008年04月29日 22:26:00|评论(loading...)|收藏
In ASP.NET 2.0, there is a new property called the ValidationGroup that can be assigned a string to specify a section. This property exists on the validation controls and on the controls that cause PostBacks to occur. When a control performs a PostBack, the validator controls that have a matching ValidationGroup property are validated.阅读全文>
发表于 @ 2008年03月16日 17:16:00|评论(loading...)|收藏
A DataTableReader created using DataTable.CreateDataReader will expose the same rows and columns as the DataTable. When a DataTableReader is created from a DataSet or a DataTable's CreateDataReader method, the DataTableReader will contain all of the rows from the container object, with the exception of deleted rows.阅读全文>
发表于 @ 2008年03月16日 16:05:00|评论(loading...)|收藏
if you populate the contents of a control every time a page is requested, you should disable view state for that control.阅读全文>
发表于 @ 2008年03月09日 16:53:00|评论(loading...)|收藏
NHamlNHaml (pronounced enamel) is a pure .NET implementation of the popular Rails Haml view engine.NHaml is an external DSL for XHTML. It’s primary qualities are it’s simplicity, terseness, performance and that it outputs nicely formatted XHTML. Additionally, the NHaml view engine provides support for Rails style layouts and partials – more on that below.see more: http://andrewpeters.net/2007/12/19/introducing-nhaml-an-aspnet-mvc-view-engine/XsltViewEngine in the MVCContriba XS阅读全文>
发表于 @ 2008年01月11日 17:42:00|评论(loading...)|收藏
MVC架构下如何实现登录验证这一常见功能?Troy通过一个Security Controller给出了一种方法:
http://www.squaredroot.com/post/2007/12/ASPNet-MVC-Membership-Basics.aspx
权限验证的一个方法:
http://www.squaredroot.com/post/2008/01/MVC-Authentication-and-Errors.aspx阅读全文>
发表于 @ 2008年01月10日 16:15:00|评论(loading...)|收藏