03 2012 档案
摘要:委托是一个类,它定义了方法的类型,使得可以将方法当作另一个方法的参数来进行传递,这种将方法动态地赋给参数的做法,可以避免在程序中大量使用If-Else(Switch)语句,同时使得程序具有更好的可扩展性。1.将方法作为参数using System;using System.Collections.Generic;using System.Text;namespace Delegate { //定义委托,它定义了可以代表的方法的类型 public delegate void GreetingDelegate(string name); class Progra...
阅读全文
摘要:Using the Code1. Define the Person class that includes the ID, Name, and Age properties.class Person { public Person(int id, string name, int age) { this.id = id; this.name = name; this.age = age; } private int id; /// <summary> /// Person ID /...
阅读全文
摘要:最近碰到一个问题:页面使用了Ajax,非jQuery,用的是微软的ScriptManager和UpdateProgress。如何在数据回传过程中禁止用户重复提交?即用户点了提交按钮后,按钮不能用,等到数据回传后,按钮状态自动变为可用!前台页面:<form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:UpdatePanel runat="serv
阅读全文
摘要:SQL SERVER2012在ORDER BY 子句中加入了新元素offset,允许用户在排序完成的结果集中自定义输出行范围,大大简化了分页SQL的书写方式和效率use master go set nocount on go set showplan_text on go --2012的OFFSET分页方式 select number from spt_values where type='p' order by number offset 10 rows fetch next 5 rows only; go --2005的ROW_NUMBER分页方式 se...
阅读全文

浙公网安备 33010602011771号