【.Net】Visual Studio 无法输入中文的问题

 是我输入设置引起的。

按下图设置可正常。

 

标签:

【.Net】Open Flash Chart在IIS7下的完全配置攻略

首先感谢Open Flash Chart开发小组为我们提供了如此强大的Web Chart工具,更要感激Xiao Yifang为我们制作了.net环境下的封装组件。

大家在IIS7下部署Xiao的组件时,一般遇到的问题是IO拒绝访问,500错误等。下面就这些问题作一个简短说明。

Open Flash Chart的.Net组件使用了IHttpHandler,除了在Web.Config中进行配置外,需要在IIS中进行IHttpHandler注册。

IIS配置:

...

标签:

【.Net】如何调试Linq

《ASP.NET 3.5揭秘》一书中有详细的描述:

1. 使用LINQ to SQL Debug Visualizer,http://www.scottgu.com/blogposts/linqquery/sqlserverqueryvisualizer.zip,将其解压到D:\Program Files\Microsoft Visual Studio 9.0\Common7\Packages\Debugger\Visualizers\,然后就可以再断点处进行跟踪了
2. 使用页面的Trace来跟踪所有的Linq语句,方法是将下面的代码放到App_Code文件夹
...

标签:

症状:VS2005,点击调试,页面从http:://localhost:5389自动跳转到http://www.localhost.com:5392
解决:最后发现是我ESET NOD32的原因。下面是设置图,设置后症状消失。

标签:

【.Net】当Xml中包含xmlns时,SelectSingleNode取不到的情况

我们需要使用XmlNamespaceManager来添加对应的名称空间,然后在SelectSingleNode中使用这个名称个空间
比如:
<root xmlns="http://xxxxxxxxx">
<xxxx></xxxx> </root>
F()
{
XmlDocument xmlDoc = new XmlDoc

标签:

【.Net】DbType+SqlDbType+系统数据类型对照表

Sql类型 DbType SqlDbType Type
bit Boolean Bit System.Boolean
tinyint Byte TinyInt System.Byte
smallint Int16 SmallInt System.Int16
int Int32 Int System.Int32
bigint Int64 BigInt System.Int64
real Single Real System.Single
float Double Float System.Double
smallmoney Decimal SmallMoney System.Decimal
money Decimal Money System.Decimal
numeric Decimal Decimal System.Decimal
decimal Decimal Decimal System.Decimal
smalldatetime DateTime SmallDateTime System.DateTime
datetime DateTime DateTime System.DateTime
binary Byte[] Binary System.Byte的Array
varbinary Byte[] VarBinary System.Byte的Array
image Byte[] Image System.Byte的Array
timestamp Byte[] Timestamp System.Byte的Array
char String Char System.String
nchar String NChar System.String
varchar String VarChar System.String
nvarchar String NVarChar System.String
text String Text System.String
ntext String NText System.String
xml String Xml System.String
uniqueidentifier Guid UniqueIdentifier System.Guid
sql_variant Object Variant System.Object

标签:

【.Net】如何在CCNet的测试部分加入外部程序集

最近在持续构建的测试环节中遇到了一个问题报告中的提示为:初始化方法 xxx 引发异常。System.IO.FileNotFoundException: System.IO.FileNotFoundException: 未能加载文件或程序集“SQLServerDAL.dll”或它的某一个依赖项。系统找不到指定的文件。警告: 程序集绑定日志记录被关闭。

【.Net】获取高质量缩略图

【.Net】获取高质量缩略图,使用.Net自带的缩略图方法,会导致缩略图严重失真。我们可以用DrawImage方法来替代。

标签:

【C# 2008】如何将LINQ的查询结果作为返回值

前面所有的例子都定义在本地方法中。而且保存结果的变量都是隐式类型本地变量。我们说过,这种变量不能用作参数、返回值、类字段等。那我们如何才能返回LINQ查询结果呢?答案是,我们可以不用var,而改用IEnumerable<T>或者实现IEnumerable的类型。如果只返回对象的部分内容,部门可以用ToArray()方法,将结果集以Array的方式传出。

标签:

【C# 2008】LINQ演练

查询运算符说明

查询运算符 说明
from, in 构成Linq查询的基础,作用是从容器中提取数据
where 搜索条件
select 提取哪些内容
join, on, equals, into 关联
orderby, ascending, descending 排序
group, by 分组

除上表中的简化运算符外,还有很多方法,他们没有对应的简化运算符,例如:

用以转化结果的:Reverse<>()、ToArray<>()、ToList<>()
用以获取单数据的:Distinct<>()、Union<>()、Intersect<>()
用以聚集计算的:Count<>()、Sum<>()、Min<>()、Max<>()

标签:

分页:«123»