【摘要】当你的ASP.NET MVC项跑在IIS时,出现如标题Handler "BlockViewHandler" has a bad module "ManagedPipelineHandler" in its module list异常时,可以尝试下面的解决方法,重新为IIS注册Framework。 6阅读全文
...继续阅读
(159)
【摘要】部署一个ASP.NET MVC网站至一个全新的服务器Windows Server 2008 R2, 数据为MS SQL Server 2014 64bit Expression版本。运行时,它第一次显示出来是一个异常: The Web server is configured to not list阅读全文
...继续阅读
(52)
【摘要】学习LINQ的Lambda的表达式,尝试从数据集合中,选择其中几列。创建一个model: source code: namespace Insus.NET.Models { public class ProdImage { public int ProductID { get; set; } pub阅读全文
...继续阅读
(30)
【摘要】在视图中,引用model,并绑定。有2种情况,一是数据集,另一个是单个model。实现之前,有准备一个数据吧。创建一个model:source code: namespace Insus.NET.Models { public class Book { public string Publishin阅读全文
...继续阅读
(32)
【摘要】方法All返回布尔值bool,判断集合中是否所有元素都满足某一条件,通俗一点说,就是每一个元素,均符合同一个条件,它才返回真,不然返回假。举列,创建一个model: source code: namespace Insus.NET.Models { public class Book { publi阅读全文
...继续阅读
(20)
【摘要】IEnumerable没有一个ForEach方法,我们可以使用C#写一个扩展方法: Source Code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Sys阅读全文
...继续阅读
(26)
【摘要】自从在ASP.NET MVC中使用NuGet添加SignalR类库之后,再次运行程序时,它出现了一个异常: Server Error in '/' Application. The following errors occurred while attempting to load the app.阅读全文
...继续阅读
(20)
【摘要】一个程序也许会被多个用户运行,如下:那在VB.NET的WinForm环境下,怎样获取User Name呢?可从下面的方法: 代码: Public Shared Function GetProcessOwner(ByVal ProcessName As String) As String Dim po阅读全文
...继续阅读
(31)