07 2013 档案
摘要:DateTime dt = DateTime.Now; int weeknow = Convert.ToInt32(DateTime.Now.DayOfWeek); int dayspan = (-1) * weeknow + 1; DateTime dt2 = dt.AddMonths(1); //获取本周第一天 this.Label1.Text = DateTime.Now.AddDays(dayspan).ToString("yyyy-MM-dd"); //本月第一天 thi...
阅读全文
posted @ 2013-07-30 10:58
Follow-your-heart
摘要:前台js方法(写在head标签之内)1 后台方法。我选用的是一个LinkButtonprotected void LinkButton2_Click(object sender, EventArgs e) { int count = 0; for (int i = 0; i <= GridView1.Rows.Count - 1; i++) { CheckBox cbox = (CheckBox)GridView1.Rows[i].FindControl("cbSelect"); if...
阅读全文
posted @ 2013-07-24 09:00
Follow-your-heart
摘要:IComparable:一种特定于类型的通用比较方法,值类型或类通过实现此方法对特认定进行排序。IComparable的作用是提供了一种比较两个对象的特定类型的方法。这是必需的如果您想要为对象提供任何排序功能。视为IComparable提供您的对象的默认排序次序。例如对于如果您有一个您的类型的对象的数组,并在该数组上调用Sort方法IComparable在排序过程中提供对象的比较。实现IComparable接口时, 必须实现CompareTo方法此接口由具有可排序值的类型实现。它要求实现类型定义单个方法CompareTo,该方法指示当前实例在排序顺序中的位置是位于同一类型的另一个对象之前、之.
阅读全文
摘要:C#中类型Type有个GetMethod方法,调用该方法可获取指定方法名的方法信息实例。使用时,其参数一般为2个,一个是方法名称字符串(可设置条件忽略大小写),另外一个参数为搜索方法的条件枚举。该方法返回的是MethodInfo类型的实例,获取到了这个实例之后,我们就可以调用并执行该方法了。MethodInfo method = type.GetMethod( funcName , BindingFlags.IgnoreCase | BindingFlags.Static | BindingFlags.Public );这里要注意,搜索条件枚举,即第2个参数,要包含BindingFlags.P
阅读全文
posted @ 2013-07-18 14:06
Follow-your-heart
摘要:function dateChange(name){var beginTimeObject = document.getElementById("beginTime");var endTimeObject = document.getElementById("endTime");var beginTime;var endTime;var now = new Date();var month = now.getMonth();var year = now.getFullYear();var day = now.getDate();var wday = no
阅读全文
posted @ 2013-07-17 10:07
Follow-your-heart
摘要:protected void lnkbtnFrist_Click(object sender, EventArgs e) { //首页 this.GridView_username.PageIndex = 0; this.ReadData(); } protected void lnkbtnPre_Click(object sender, EventArgs e) { //上一页 if (this.GridView_username.PageIndex > 0) { ...
阅读全文
posted @ 2013-07-15 10:55
Follow-your-heart
摘要:原文出自:http://mobile.51cto.com/iphone-402619.htm1、Object-C有多继承吗?没有的话用什么代替?cocoa中所有的类都是NSObject的子类 多继承在这里是用protocol委托代理来实现的你不用去考虑繁琐的多继承,虚基类的概念.ood的多态特性在obj-c中通过委托来实现.2、Object-C有私有方法吗?私有变量呢? objective-c–类里面的方法只有两种,静态方法和实例方法.这似乎就不是完整的面向对象了,按照OO的原则就是一个对象只暴露有用的东西.如果没有了私有方法的话,对于一些小范围的代码重用就不那么顺手了.在类里面声名一个私有方
阅读全文
posted @ 2013-07-12 08:29
Follow-your-heart
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Configuration; 4 using System.Web.Configuration; 5 using System.Text; 6 using System.IO; 7 8 /// 9 /// SystemConfig 的摘要说明 10 /// 11 public static class SystemConfig12 {13 private static Configuration ConfigFile;14 pr...
阅读全文
摘要:服务器磁盘上的物理路径: HttPRuntime.AppDomainAppPath虚拟程序路径: HttpRuntime.AppDomainAppVirtualPath任何于Request/HttpContext.Current等相关的方法, 都只能在有请求上下文或者页面时使用. 即在无请求上下文时,HttpContext.Current为null. 而上面提到的方法一直可用.对于全局Cache对象的访问亦然.==================================================================================示例:输出asp.ne
阅读全文
posted @ 2013-07-10 16:38
Follow-your-heart
摘要:装了VS2005再装IIS,结果出了些小问题 “访问IIS元数据库失败 ” 思考可能是次序出了问题,解决 1、打开CMD,进入 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 2、输入 aspnet_regiis.exe -i 稍等片刻,注册成功就解决问题了。 接着还会出现“未能创建 Mutex”的问题 解决方法: 1、先关闭你的VS2005。 2、打开 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files 找到你刚才调...
阅读全文
posted @ 2013-07-03 16:36
Follow-your-heart
摘要:1 1.Asp.Net中几种相似的标记符号: 解释及用法 2 3 答: : 是在绑定控件DataBind()方法执行时被执行,用于数据绑定 4 5 如: 6 7 : 在程序执行时被调用,可以显示后台变量值 8 9 如: 10 11 *.aspx中: 12 13 *.cs中: protected string aaa="姓名"; 14 15 : 内联代码块里面可以在页面文件*.aspx或*.ascx文件里面嵌入后台代码 16 17 如: 18 19 30 31 是在*.aspx页面前台代码导入命名空间, 32 33 如: 34 35 36 3...
阅读全文
posted @ 2013-07-02 11:15
Follow-your-heart
摘要:1 2 3 无标题页 4 27 28 29 30 31 32 33 34 后台代码: 1 Default.aspx.cs: 2 3 using System; 4 using System.Data; 5 using System.Configuration; 6 using System.Web; 7 using System.Web.Security; 8 using System.Web.UI; 9 using System.Web.UI.WebControls;10 using System.We...
阅读全文
posted @ 2013-07-02 10:08
Follow-your-heart

浙公网安备 33010602011771号