2010年12月24日

CSS

摘要: 1.去除ie6双倍margin:在float的那个div 设置div的样式为 display:inline; 阅读全文

posted @ 2010-12-24 17:07 Paste 阅读(119) 评论(0) 推荐(0)

C#计算程序执行时间

摘要: 1.用C#取出域名string url = "http://zhidao.baidu.com/question/57172275.html";string domain = Regex.Match(url, @"(?<=://)[a-zA-Z\.0-9]+(?=\/)").Value.ToString();2.用C#计算程序执行的时间Stopwatch sw = new Stopwatch();sw.Start();//要执行的代码sw.Stop();long timeTotal = sw.ElapsedMilliseconds;//毫秒 阅读全文

posted @ 2010-12-24 17:00 Paste 阅读(165) 评论(0) 推荐(0)

2010年11月3日

C# 获取命名空间,类,方法名

摘要: string pageName = "页面名" + System.IO.Path.GetFileName(HttpContext.Current.Request.Path); string fileName = ""; fileName += "命名空间:" + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Namespace + ";"; fileName += "类:" + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName 阅读全文

posted @ 2010-11-03 18:48 Paste 阅读(2382) 评论(0) 推荐(0)

2010年10月29日

C# 上传下载文件

摘要: 代码 阅读全文

posted @ 2010-10-29 18:17 Paste 阅读(173) 评论(0) 推荐(0)

2010年10月28日

js实现页面跳转的几种方式

摘要: 第一种:<script language="javascript" type="text/javascript"> window.location.href="login.aspx?backurl="+window.location.href; </script>第二种:<script language="javascript">alert("返回");wind... 阅读全文

posted @ 2010-10-28 11:25 Paste 阅读(180) 评论(0) 推荐(0)

2010年10月27日

C# Split

摘要: 代码 阅读全文

posted @ 2010-10-27 15:55 Paste 阅读(125) 评论(0) 推荐(0)

2010年10月25日

ASP.Net

摘要: 1.获取页面名字string pageName = System.IO.Path.GetFileName(HttpContext.Current.Request.Path); 2.弹出提示框Page.ClientScript.RegisterStartupScript(this.GetType(), "message", "<script>alert('提示消息')</script>");3.继承了母版页的子页面调用js代码子页面js代码引用写成...<script language="javasc 阅读全文

posted @ 2010-10-25 16:09 Paste 阅读(140) 评论(0) 推荐(0)

2010年10月20日

C#方法参数:params,ref,out,可选参数,命名参数

摘要: 1.paramsparams 关键字可以指定在参数数目可变处采用参数的方法参数,在方法声明中只允许一个 params 关键字,并且是最后一个参数。usingSystem;classApp{ publicstaticvoidUseParams(paramsobject[]list){for(inti=0;i<list.Length;i++){Console.WriteLine(list[i]);}}staticvoidMain(){//一般做法是先构造一个对象数组,然后将此数组作为方法的参数object[]arr=newobject[3]{100,'a',"key 阅读全文

posted @ 2010-10-20 10:05 Paste 阅读(2658) 评论(0) 推荐(0)

2010年10月18日

ashx生成验证码

摘要: using System.Web.SessionState; //用到sessionpublic class Validate : IHttpHandler,IRequiresSessionState //为要使用session实现的接口{ public void ProcessRequest (HttpContext context) { string checkCode = GetVali... 阅读全文

posted @ 2010-10-18 15:36 Paste 阅读(3063) 评论(0) 推荐(0)

关于vs连接access

摘要: 第一:连接字符串首先在web.config文件配置(Access2003和2007都一样)<connectionStrings><add name='DBPath' connectionString='~/App_Data/Web.mdb'/><!--数据库路径,前面的~必须保留--></connectionStrings>第二:连接字符串Acces... 阅读全文

posted @ 2010-10-18 15:18 Paste 阅读(1795) 评论(0) 推荐(0)

导航

点击右上角即可分享
微信分享提示