<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_Kevin_分类_02-ASP.NET</title><id>http://feed.cnblogs.com/blog/u/35666/category/134823/rss</id><updated>2012-06-03T14:38:40Z</updated><generator>feed.cnblogs.com</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/category/134823.html"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/35666/category/134823/rss"/><entry><id>http://www.cnblogs.com/kevin-wang/archive/2011/08/10/2133645.html</id><title type="text">ASP.NET MVC3中Model验证</title><summary type="text">概述 上节我们学习了Model的数据在界面之间的传递，但是很多时候，我们在数据传递的时候为了确保数据的有效性，不得不给Model的相关属性做基本的数据验证。 本节我们就学习如何使用 System.ComponentModel.DataAnnotations 命名空间中的特性指定对数据模型中的各个字段的验证。 这些特性用于定义常见的验证模式，例如范围检查和必填字段。而 DataAnnotations...</summary><published>2011-08-10T06:15:00Z</published><updated>2011-08-10T06:15:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/10/2133645.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/10/2133645.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2011/08/06/2129405.html</id><title type="text">Orchard架构介绍</title><summary type="text">今天有空再次看看Orchard的其它内容，本篇介绍一下Orchard的一些架构方面的内容。Orchard内容较多，现在还只是了解一些皮毛，还有待进一步学习，放上来权当随笔记录。 Architecture Orchard foundations Orchard构建在已有的一些框架和类库之上，下面是一些主要内容： ASP.NET MVC：这是微软开源的基于MVC的Web开发框架 NHibernate：...</summary><published>2011-08-06T05:34:00Z</published><updated>2011-08-06T05:34:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/06/2129405.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/06/2129405.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2011/08/06/2129390.html</id><title type="text">初探Razor视图引擎</title><summary type="text">Razor有着非常简单和干净的语法，但是不管怎么样，它毕竟只是一个表现层面的东西，其底层仍然使用ASP.NET，与平时的开发没有什么大的区别，唯一的区别在于：视图的简洁。 安装 使用Razor需要安装 Microsoft ASP.NET Web Pages，当然，官方的做法是：直接用Web Plamform安装WebMatrix，不过WebMatrix现在还处于Beta阶段，估计以后会增加更多支持Razor的功能。 安装完毕后打开WebMatrix，然后就可以通过Site Form Template来新建一个站点测试了。 默认生成的站点在“我的文档”\My Web Sites下以站点名命名。.</summary><published>2011-08-06T05:01:00Z</published><updated>2011-08-06T05:01:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/06/2129390.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/06/2129390.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2011/08/05/2128900.html</id><title type="text">ASP.NET MVC3 Service Location</title><summary type="text">介绍 ASP.NET MVC3 的一个重要的新特性就是允许注册一个服务点 Service Location，然后在框架中使用的能力。以前版本的 MVC 已经提供了 Service Location 和依赖注入的机会，在 MVC3 中，我们正式提供了这种能力，并且为开发者开放了多种使用的机会。 总体策略 关于 Service Location 的最重要的部分就是它是可选的，这意味着如果你对 Serv...</summary><published>2011-08-05T09:59:00Z</published><updated>2011-08-05T09:59:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/05/2128900.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/05/2128900.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2011/08/05/2128358.html</id><title type="text">ASP.NET MVC3 URL友好化的重型武器[路由]</title><summary type="text">摘自：http://www.cnblogs.com/highend/archive/2011/07/27/aspnet_mvc3_route.html I:URL友好化的优势 在过去,我们开发ASP.NET应用程序的时候常常会使用URL的QueryString去传递参数给ASP.NET处理. 如:http://localhost:1029/Default.aspx?key_1=value_1&amp;k...</summary><published>2011-08-05T03:01:00Z</published><updated>2011-08-05T03:01:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/05/2128358.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/05/2128358.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2011/08/05/2128135.html</id><title type="text">ASP.NET MVC3 - 控制器 &amp;amp; 视图</title><summary type="text">原文摘自：http://www.cnblogs.com/highend/archive/2011/08/04/aspnet_mvc3_controller_and_view.html I:控制器和视图的基础概念 1.控制器的概念 控制器在ASP.NET MVC3当中是最终处理客户端请求的一个实现,他有个一硬性条件就是必须实现System.Web.Mvc.IController接口,而且类的命名必...</summary><published>2011-08-05T00:56:00Z</published><updated>2011-08-05T00:56:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/05/2128135.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/05/2128135.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2011/08/04/2127054.html</id><title type="text">在WebForm中使用MVC</title><summary type="text">摘自：http://kb.cnblogs.com/page/93085/ 解决思路： 不改变ASP.NET管线的请求处理流程，请求还是正常到达一个.aspx页面，然后再转手给ASP.NET MVC。也就是把WebForm作为一个中转站。 好处： 在现有项目中，以最小的代价用上ASP.NET MVC。先品尝一下Razor的美味。 解决方法： 用System.Web.Mvc.MvcHandler可以轻...</summary><published>2011-08-04T02:53:00Z</published><updated>2011-08-04T02:53:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/04/2127054.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/04/2127054.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2011/08/04/2127034.html</id><title type="text">ASP.NET MVC3 Razor视图引擎-基础语法</title><summary type="text">I:ASP.NET MVC3在Visual Studio 2010中的变化 在VS2010中新建一个MVC3项目可以看出与以往的MVC2发生了很明显的变化。 1.ASP.NET MVC3必要的运行环境为.NET 4.0 (想在3.5用MVC3,没门!)。 2.默认MVC3模板项目已集成 3.全新的Razor视图引擎 @{ ViewBag.Title = "Home Page";} &lt;h2&gt;@ViewBag.Message&lt;/h2&gt;&lt;p&gt; To learn more about ASP.NET MVC visit &lt;a href=&amp;q</summary><published>2011-08-04T02:42:00Z</published><updated>2011-08-04T02:42:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/04/2127034.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/04/2127034.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2011/08/03/2126407.html</id><title type="text">在ASP.NET MVC中使用DropDownList</title><summary type="text">在ASP.NET MVC中，尽管我们可以直接在页面中编写HTML控件，并绑定控件的属性，但更方便的办法还是使用HtmlHelper中的辅助方法。在View中，包含一个类型为HtmlHelper的属性Html，它为我们呈现控件提供了捷径。 我们今天主要来讨论Html.DropDownList的用法，首先从Html.TextBox开始。 Html.TextBox有一个重载方法形式如下： public ...</summary><published>2011-08-03T08:55:00Z</published><updated>2011-08-03T08:55:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/03/2126407.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/03/2126407.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2011/08/03/2125868.html</id><title type="text">ASP.NET MVC 模型绑定的 6 个建议</title><summary type="text">原文名称：6 Tips for ASP.NET MVC Model Binding 原文地址：G:\mvc\6-tips-for-asp-net-mvc-model-binding.aspx.htm ASP.NET MVC 中的 Model Binding 使用起来非常简单。你的 Action 方法需要数据，在传入的 HTTP 请求中携带着你需要的数据，数据可以在请求的表单数据中，还可能在你的 U...</summary><published>2011-08-03T02:22:00Z</published><updated>2011-08-03T02:22:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/03/2125868.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2011/08/03/2125868.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2010/11/15/1877542.html</id><title type="text">IIS7.5 Compliation Error CS0016</title><summary type="text">Question: Resolution： 1. Create a temporary folder under %Systemroot%, and then name it Temp. 2. Grant full permissions on the Temp folder to the aspnet user account in .NET Framework 1.0 or to the N...</summary><published>2010-11-15T04:14:00Z</published><updated>2010-11-15T04:14:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2010/11/15/1877542.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2010/11/15/1877542.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2010/06/18/asp-net-chunk.html</id><title type="text">高性能WEB开发-flush让页面分块逐步呈现</title><summary type="text">摘自：http://www.cnblogs.com/BearsTaR/archive/2010/05/19/flush_chunk_encoding.html 在处理比较耗时的请求的时候，我们总希望先让用户先看到部分内容，让用户知道系统正在进行处理，而不是无响应。一般大家在处理这种情况，都使用ajax，先把html输出到客户端，然后再用ajax取加载比较耗时的资源。用ajax麻烦的地方是增加了请...</summary><published>2010-06-18T06:39:00Z</published><updated>2010-06-18T06:39:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2010/06/18/asp-net-chunk.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2010/06/18/asp-net-chunk.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2010/06/07/1752977.html</id><title type="text">让 C#智能注释时允许换行</title><summary type="text">C# XML注释换行，效果如下： 只需将&lt;para&gt; 标记用于诸如 &lt;summary&gt;、&lt;remarks&gt; 或 &lt;returns&gt; 等标记内即可。</summary><published>2010-06-07T01:57:00Z</published><updated>2010-06-07T01:57:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2010/06/07/1752977.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2010/06/07/1752977.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2010/05/31/jQuery-localization.html</id><title type="text">jQuery1.4.1中文化</title><summary type="text">昨天安装后Visual Studio2010后，发现集成的jQuery1.4.1竟然已经中文化了，这个消息对于英语不怎么好的朋友好算是个好的消息，再加个jQuery1.4.1中文帮助可算是完美了，在此发布出来供需要的朋友下载；下载地址：jQuery-1.4.1 jQuery-1.4-API.rar附图： 此文为分享收藏；</summary><published>2010-05-31T03:05:00Z</published><updated>2010-05-31T03:05:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2010/05/31/jQuery-localization.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2010/05/31/jQuery-localization.html"/><content type="text">昨天安装后Visual Studio2010后，发现集成的jQuery1.4.1竟然已经中文化了，这个消息对于英语不怎么好的朋友好算是个好的消息，再加个jQuery1.4.1中文帮助可算是完美了，在此发布出来供需要的朋友下载；下载地址：jQuery-1.4.1 jQuery-1.4-API.rar附图： 此文为分享收藏；</content></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2010/05/27/1744864.html</id><title type="text">用IHttpAsyncHandler实现Comet</title><summary type="text">实现功能：登录、获取用户列表、退出；JS库采用jQuery1.32 解决方案 运行时的效果图： 输入帐号后，点击“Login”按钮后显示当前在线的用户列表，点击“Logout”按钮后当前用户退出后向其它在线用户推送新的在线用户列表； Default.aspx页面引用的两个js脚本，jQuery1.3.2,WebIM.js; [代码]HTML DO...</summary><published>2010-05-26T16:36:00Z</published><updated>2010-05-26T16:36:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2010/05/27/1744864.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2010/05/27/1744864.html"/><content type="text">实现功能：登录、获取用户列表、退出；JS库采用jQuery1.32 解决方案 运行时的效果图： 输入帐号后，点击“Login”按钮后显示当前在线的用户列表，点击“Logout”按钮后当前用户退出后向其它在线用户推送新的在线用户列表； Default.aspx页面引用的两个js脚本，jQuery1.3.2,WebIM.js; [代码]HTML DO...</content></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2010/05/25/1743951.html</id><title type="text">自动完成服务端控件(2)--整体结构的设计</title><summary type="text">1.前端展现DOM HTML dom 代码[代码]2.CSS样式 [代码]3.JS 脚本代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&gt;/*自动完成控件客户端JS脚本*///参数说明://id:div容器id,clientid:控件IDAutoCo...</summary><published>2010-05-25T14:34:00Z</published><updated>2010-05-25T14:34:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2010/05/25/1743951.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2010/05/25/1743951.html"/><content type="text">1.前端展现DOM HTML dom 代码[代码]2.CSS样式 [代码]3.JS 脚本代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&gt;/*自动完成控件客户端JS脚本*///参数说明://id:div容器id,clientid:控件IDAutoCo...</content></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2010/05/24/1742720.html</id><title type="text">自动完成服务端控件开发(1)</title><summary type="text">前一段时间由于项目需要搜索时要根据输入的内容自动从后台查询与之相关的数据，先上图看一看最终的效果： 这篇主要先介绍一下如何使用这个控件。 1.添加对DSKJ.Controls.DLL程序集的引用 引用后控件自动加入到工具箱中. 2.属性和事件 属性 TargetControl 设置与此控件关联的TextBox控件ID Opacity 设置或获取自动提示显示时的透明度，取值1至100 OnClie...</summary><published>2010-05-24T05:54:00Z</published><updated>2010-05-24T05:54:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2010/05/24/1742720.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2010/05/24/1742720.html"/><content type="text">前一段时间由于项目需要搜索时要根据输入的内容自动从后台查询与之相关的数据，先上图看一看最终的效果： 这篇主要先介绍一下如何使用这个控件。 1.添加对DSKJ.Controls.DLL程序集的引用 引用后控件自动加入到工具箱中. 2.属性和事件 属性 TargetControl 设置与此控件关联的TextBox控件ID Opacity 设置或获取自动提示显示时的透明度，取值1至100 OnClie...</content></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2010/05/23/1742343.html</id><title type="text">你的代码进行!=null了吗？</title><summary type="text">最近在一些项目中，发现系统运行日志中出现很多引发NullReferenceException异常的问题，或者就是明明是保存了但数据库中却找不到数据，经过对代码的分析总结一下发生这些问题的原因： 1.访问Cookie时未进行非null验证，往往都是直接从Cookie中取值； this.Request.Cookie[“userinfo”][“username&amp;#82...</summary><published>2010-05-23T15:14:00Z</published><updated>2010-05-23T15:14:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2010/05/23/1742343.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2010/05/23/1742343.html"/><content type="text">最近在一些项目中，发现系统运行日志中出现很多引发NullReferenceException异常的问题，或者就是明明是保存了但数据库中却找不到数据，经过对代码的分析总结一下发生这些问题的原因： 1.访问Cookie时未进行非null验证，往往都是直接从Cookie中取值； this.Request.Cookie[“userinfo”][“username&amp;#82...</content></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2010/05/23/1742250.html</id><title type="text">系统登录统一验证</title><summary type="text">前几天发现系统中某些页面被搜索收录，并且可以不登录就能访问其中的某些页面。当然也就想到了写一个HttpHandler，来注册页面事件验证用户。马上开工………[代码]2.实现IHttpHandlerFactory接口的方法； IHttpHandlerFactory接口包含两个方法需要实现GetHandler()和ReleaseHandler();[代码][代码]...</summary><published>2010-05-23T13:46:00Z</published><updated>2010-05-23T13:46:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2010/05/23/1742250.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2010/05/23/1742250.html"/><content type="text">前几天发现系统中某些页面被搜索收录，并且可以不登录就能访问其中的某些页面。当然也就想到了写一个HttpHandler，来注册页面事件验证用户。马上开工………[代码]2.实现IHttpHandlerFactory接口的方法； IHttpHandlerFactory接口包含两个方法需要实现GetHandler()和ReleaseHandler();[代码][代码]...</content></entry><entry><id>http://www.cnblogs.com/kevin-wang/archive/2010/05/17/1737030.html</id><title type="text">[翻译]创建异步的HTTP处理程序(Create an Asynchronous HTTP Handler)</title><summary type="text">原文：http://msdn.microsoft.com/en-us/library/ms227433%28v=VS.100%29.aspx文章以图解的形式介绍以下的内容： 如何创建HTTP处理程序类，此类必须实现ProcessRequest方法和IsReusable属性. 如何在Web.config文件中注册这个处理程序和文件扩展名SampleAsync与处理程序的映射 如何通过IIS将文件扩展...</summary><published>2010-05-16T17:35:00Z</published><updated>2010-05-16T17:35:00Z</updated><author><name>Kevin-wang</name><uri>http://www.cnblogs.com/kevin-wang/</uri></author><link rel="alternate" href="http://www.cnblogs.com/kevin-wang/archive/2010/05/17/1737030.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/kevin-wang/archive/2010/05/17/1737030.html"/><content type="text">原文：http://msdn.microsoft.com/en-us/library/ms227433%28v=VS.100%29.aspx文章以图解的形式介绍以下的内容： 如何创建HTTP处理程序类，此类必须实现ProcessRequest方法和IsReusable属性. 如何在Web.config文件中注册这个处理程序和文件扩展名SampleAsync与处理程序的映射 如何通过IIS将文件扩展...</content></entry></feed>
