Skip to main content

Posts

asp.net mvc 4 bootstrap3 jquery.validation

如果只是bootstrap3和jquery.validation的话,参考 Bootstrap 3 with jQuery Validation Plugin 只需很简单的: 再加上asp.net mvc4的话,情况就有点不同了,mvc4会在 errorElement 外面在加一层,并移除内层元素的 class 的内容: 我的解决办法是将 .field-validation-error 赋予和 .'help-block 相同的css样式

解决framework 4.5程序部署到Windows 8和windows 8.1出现“An app on your PC needs the following Windows feature: .NET Framework 3.5 (includes .NET 2.0 and 3.0)”

在windows 7 x64上编译的.net framework 4.5程序,使用InstallShiled打包以后安装到windows 8 && 8.1后出现 “An app on your PC needs the following Windows feature: .NET Framework 3.5 (includes .NET 2.0 and 3.0)” 的提示。 因为在windows8上默认只安装有.net framework 4.0 4.5,没有使用CLR 2.0的framework 2.0 3.0 3.5,而4.x使用的全新的CLR 4.0. 根据 how-to-solve-an-app-on-your-pc-needs-the-following-windows-feature-net-framework-3-5-includes-net-2-0-and-3-0-on-windows-8 这篇文章中提到相关资料,在exe.config中添加:

sql server 2005 中文乱码

数据库:sql server 2005 express Collation: SQL_Latin1_General_CP1_CI_AS 字段类型: nvarchar 使用INSERT INTO向数据库中插入数据,使用拼接字符串的方式来生成sql。 INSERT INTO tbABCD(col) VALUES('中文'); 当数据中有中文字符的时候,会发现数据库中实际是乱码。替换为SqlCommand和SqlParameter的方式以后又能正确的显示。 google了一下,发现需要在包含中文的字符串前面加N: When dealing with Unicode string constants in SQL Server you must precede all Unicode strings with a capital letter N INSERT INTO tbABCD(col) VALUES( N '中文');" 千万不要再使用拼接字符串的方式来生成sql

火焰德魯伊

做完火焰之地的任務,最後得了個可變身火焰德魯伊的東東,看起來還不錯,可惜cd1小時,才持續5分鐘。