Loading

随笔分类 -  C#

摘要:IntroductionBlogEngine.NET is an open source .NET blogging project that was born out of desire for a better blog platform. A blog platform with less complexity, easy customization, and one that takes advantage of the latest .NET features.BlogEngine.NET was designed using the current .NET framework a 阅读全文
posted @ 2011-03-13 13:41 .net's 阅读(777) 评论(0) 推荐(0)
摘要:1: DateTime start1 = DateTime.Parse(TextBox1.Text); 2: 3: DateTime end1 = DateTime.Parse(TextBox2.Text); 4: 5: DateTime start2 = DateTime.Parse(TextBox3.Text); 6: 7: DateTime end2 = DateTime.Parse(TextBox4.Text); 8: 9: TimeSpan ts1 = start2 - start1; 10: 11: TimeSpan ts2; 12: 13: if (ts1.Ticks > 阅读全文
posted @ 2011-03-06 16:31 .net's 阅读(761) 评论(0) 推荐(0)
摘要:asp.net,javascript,RequiredFieldValidator,DetailsView,CommandField. 为CommandField注册脚本 阅读全文
posted @ 2011-02-15 20:42 .net's 阅读(696) 评论(0) 推荐(0)
摘要:今天碰到一个问题,其实之前也有碰到过。在visual studio 2010创建控制台程序的时候(其它项目还不知道会不会有同样的问题)。添加log4net.dll引用,随便写点代码,如:[代码]编译,通不过,Error1The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?)C:\Users\Joe\Desktop\sample\sample\ConsoleApplication1\Program.cs57Consol 阅读全文
posted @ 2010-12-29 22:42 .net's 阅读(1322) 评论(0) 推荐(1)
摘要:windows service代码 inno setup 代码 阅读全文
posted @ 2010-12-21 13:30 .net's 阅读(910) 评论(0) 推荐(0)
摘要:Some of you read that code and are thinking to yourself, “String concatenation!? Are you kidding?” Yeah, we could use a StringBuilder, but for a small number of concatenations, concatenating a string ... 阅读全文
posted @ 2010-12-14 15:17 .net's 阅读(310) 评论(0) 推荐(0)
摘要:Track your visitors using an HttpModule 阅读全文
posted @ 2010-10-31 17:52 .net's 阅读(434) 评论(0) 推荐(0)
摘要:The reference rates are usually updated by 3 p.m. C.E.T. They are based on a regular daily concertation procedure between central banks across Europe and worldwide, which normally takes place at 2.15 ... 阅读全文
posted @ 2010-10-31 17:16 .net's 阅读(596) 评论(0) 推荐(0)
摘要:出处:Simple FTP file upload in C# 2.0 阅读全文
posted @ 2010-10-31 13:41 .net's 阅读(615) 评论(0) 推荐(0)
摘要:为什么要使用FindByValue而不使用SelectedValue???  假设this.DropDownList1.SelectedValue == "1",即选择的是b。若传入的值为"A” 使用FindByValue则this.DropDownList1.SelectedValue还是等于“1”,即还是选择的是第二项没有改变。(操作者以为是传入正确的... 阅读全文
posted @ 2010-09-16 00:17 .net's 阅读(393) 评论(0) 推荐(0)
摘要:method 1: method 2: behind-code 阅读全文
posted @ 2010-08-01 12:21 .net's 阅读(474) 评论(0) 推荐(0)
摘要:将DataSet转换为xml时,若DataSet某一列全部为dbnull时,方法1不会丢失该列,方法2会丢失该列。方法1:using (StringWriter sw = new StringWriter()) { ds.WriteXml(sw, XmlWriteMode.WriteSchema); ReturnXml = sw.ToString(); return ReturnXml; }方法2... 阅读全文
posted @ 2010-07-29 16:23 .net's 阅读(462) 评论(0) 推荐(0)
摘要:string JavaScriptStringEncode(string value){ if (string.IsNullOrEmpty(value)) { return string.Empty; } StringBuilder builder = null; int startIndex = 0; int count = 0; for (int i = 0; i < value.Len... 阅读全文
posted @ 2010-06-19 20:39 .net's 阅读(812) 评论(0) 推荐(0)
摘要:错误:Internal Server Error. This can include HTTP Error 500.22, and HTTP Error 500.23: An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode. This occurs because A... 阅读全文
posted @ 2010-04-02 21:19 .net's 阅读(636) 评论(0) 推荐(0)
摘要:匹配任意嵌套的html标签[代码]详见:使用正则表达式匹配嵌套Html标签 阅读全文
posted @ 2010-03-11 20:09 .net's 阅读(883) 评论(0) 推荐(0)
摘要:如何:创建 Windows Communication Foundation 客户端这是创建基本 Windows Communication Foundation (WCF) 服务和可以调用该服务的客户端所需的六项任务中的第四项任务。有关全部六项任务的概述,请参见入门教程主题。本主题描述如何检索 WCF 服务中的元数据,以及如何使用这些元数据创建可以访问该服务的 WCF 代理。此任务是通过使用 W... 阅读全文
posted @ 2009-12-09 11:07 .net's 阅读(406) 评论(0) 推荐(0)
摘要:In order to for the client to communicate with a WCF service, we need a proxy object. This can be quite a daunting task (and a little complicated to be honest). Luckily like a lot of things in .NET 3.... 阅读全文
posted @ 2009-12-09 10:21 .net's 阅读(413) 评论(0) 推荐(0)
摘要:[代码][代码] 阅读全文
posted @ 2009-12-01 14:31 .net's 阅读(357) 评论(0) 推荐(0)
摘要:方法、实例构造函数、索引器和运算符是由它们的签名来刻画的: 方法签名由方法的名称和它的每一个形参(按从左到右的顺序)的类型和种类(值、引用或输出)组成。需注意的是,方法签名既不包含返回类型,也不包含 params 修饰符(它可用于最右边的参数)。实例构造函数签名由它的每一个形参(按从左到右的顺序)的类型和种类(值、引用或输出)组成。具体说来,实例构造函数的签名不包含可为最右边的参数指定的 para... 阅读全文
posted @ 2009-11-14 09:07 .net's 阅读(473) 评论(0) 推荐(0)
摘要:C#接口编程实例向你讲述了事件与接口的联合应用很多初学C#的朋友对于事件与接口感到迷惑不解,不明白它们之间的关系,下面我就用实例来简单的分析讲解一下。C#接口编程实例问题的解决之前我们来看看事件的创建过程,用event修饰符来代表一个事件,我们要创建一个C#事件必须按以下顺序来扫行:C#接口编程实例1,创建或标识一个代表。比如下例中的publicdelegatevoiddele(); //声明代表... 阅读全文
posted @ 2009-10-19 14:14 .net's 阅读(665) 评论(0) 推荐(0)