09 2012 档案
摘要:javascript 中:var keyStr = keyList.join("_");c# 中:string.Join("_", array);or, for lists:string.Join("_", list.ToArray());var keyStr = keyList.join("_");也可以进行类型扩展:如:public static class ArrayExtension{public static string AsString(this string[] array, string sepe
阅读全文
摘要:^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$ 正数C#正则表达式小结只能输入数字:"^[0-9]*$"。只能输入n位的数字:"^\d{n}$"。只能输入至少n位的数字:"^\d{n,}$"。只能输入m~n位的数字:。"^\d{m,n}$"只能输入零和非零开头的数字:"^(0|[1-9][0-9]*)$"。只能输入有两位小数的正实数:"^[0-9]+(.[0-9]{2})?$
阅读全文
摘要:USE [CRM]GO/****** Object: UserDefinedFunction [dbo].[GetDiscountByCampaignId] Script Date: 09/28/2012 15:18:02 ******/SET ANSI_NULLS ONGOSET QUOT...
阅读全文
摘要:Top/Bottom操作适用场景:适量的取出自己想要的数据,不是全部取出,这样性能有所加强。Take说明:获取集合的前n个元素;延迟。即只返回限定数量的结果集。var q = ( from e in db.Employees orderby e.HireDate select e) .Take(5);语句描述:选择所雇用的前5个雇员。Skip说明:跳过集合的前n个元素;延迟。即我们跳过给定的数目返回后面的结果集。var q = ( from p in db.Products orderby p.UnitPrice descending select p) .Skip(10);语句描述:选择10
阅读全文
摘要:LINQ的书写格式如下: from 临时变量 in 集合对象或数据库对象 where 条件表达式 [order by条件] select 临时变量中被查询的值 [group by 条件]Lambda表达式的书写格式如下:(参数列表) => 表达式或者语句块其中: 参数个数:可以有多个参数,一个参数,或者无参数。参数类型:可以隐式或者显式定义。表达式或者语句块:这部分就是我们平常写函数的实现部分(函数体)。1.查询全部实例 Code 查询Student表的所有记录。 select * from student Linq: from s in Students ...
阅读全文
摘要:由于项目需要,用到其他项目组用VC开发的组件,在web后台代码无法访问这个组件,所以只好通过后台调用前台的javascript,从而操作这个组件。在网上找了找,发现有三种方法可以访问到前台代码:第一种,OnClientClick (vs2003不支持这个方法)<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="client_click()" OnClick="Button1_Click" />cli
阅读全文
摘要:win2003 IIS默认网站被停止,启动网站提示”另一程序正在使用此文件,进程无法访问 2010-06-24 16:07IIS默认网站停止,出现错误ox8ffe2740的问题其实是因为端口占用问题引起的。。。 1、在你的IIS默认网站-点击右键属性-把tcp端口改成其他就可了,把80改成一个没有使用的端口,iis就可以使用了,如果你改成了88,那么这个时侯访问地址应该改为:http://你的IP:88/ 或http://localhost:88/来访问了。如何还不行,看看是不是本机安装了瑞星防火墙,如果安装了,你把安关闭再试。 2、查看是什么软件占用了80端口。一般用迅雷的用户可以查下...
阅读全文
摘要:在XP下,IIS5是如何运行MVC站点的呢,在2003下的IIS6里很容易就可以运行MVC,但是IIS5中需要配置一下扩展名才行选选择“默认网站”右键选择“属性”,出现下面界面后,选择“主目录”,然后选择“配置”点击“配置”后出现下面界面可以添加几个你在MVC路由中配置的扩展名,可以是aspx,asp,html,shtml等等在可执行文件中选择.net4.0的aspnet_isapi.dll文件即可。mvc2 在IIS6和IIS7 上的部署:mvc 不能部署在IIS5.1的虚拟目录下,不好用。调试发现文件的路径不对,以及一系列其他问题。IIS5.1以上的版本中,好像已经没有虚拟目录的概念了,他
阅读全文
摘要:[红]IIS6架设网站常见问题及症状答疑2010-08-28 10:46:13来源:西部e网作者:浏览次数:62 很多朋友在用IIS6架网站的时候遇到不少问题,而这些问题有些在过去的IIS5里面就遇到过,有些是新出来的,做了很多次试验,结合以前的排错经验,做出了这个总结,希望能给大家帮上忙。 问题1:未启用父路径 症状举例: Server.MapPath() 错误 \'ASP 0175 : 80004005\' 不允许的 Path 字符 /0709/dqyllhsub/news/OpenDatabase.asp,行 4 在 MapPath 的 Path 参数中不允许字符 \
阅读全文
摘要:CodeSmith 5 不支持中文注释问题:1. 启用 Enable unicode2. <%@ CodeTemplate Language="C#" TargetLanguage="C#" ResponseEncoding="UTF-8" Src="" Inherits="" Debug="true" CompilerVersion="v3.5" Description="Domain Template" %>加上 Res
阅读全文
摘要:// nullable_type_operator.csusing System;class MainClass{ static int? GetNullableInt() { return null; } static string GetStringValue() { return null; } static void Main() { // ?? operator example. int? x = null; // y = x, unless x is null, i...
阅读全文
摘要:IntroductionAs a matter of fact Microsoft Windows services, formerly known as NT services enable you to create long-running executable applications that run in its own Windows session, which then has the ability to start automatically when the computer boots and also can be manually paused, stopped
阅读全文
摘要:btnAddProduct.OnClientClick = "window.open('AddSalesProduct.aspx?campaign_id=3524165');";
阅读全文
摘要:今天调试Silverlight项目突然报错:先是:Unable to start debugging. The Silverlight Developer Runtime is not installed. Please install a matching version.然后又报:Unable to start debugging. The application uses a version of Silverlight that is not supported by the debugger.下载以下Runtime后解决问题:Silverlight 3 Developer Runti
阅读全文
摘要:Using themed css files requires a header control on the page使用主题的文件需要一个页眉页面上的控件using theme css files requires a header control on the page. must runat = "server"使用 主题 css 文件必须包含在 <header runat="server">中间</header>
阅读全文

浙公网安备 33010602011771号