首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 5 6 7 8 9 10 11 下一页

2010年5月19日

摘要: 简单MD5加密string strmd5 = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5");//str 是传进来的值strmd5 即 加密后的md5值了 阅读全文

posted @ 2010-05-19 17:25 达奇 阅读(262) 评论(0) 推荐(1) 编辑

摘要: C#洗牌using System;using System.Diagnostics;using System.Collections;namespace Dachie{ class Program { static void Main(string[] args) { //初始化牌局 int[] array = new int[54]; for (int i = 0; i < array.Length; i++) { array[i... 阅读全文

posted @ 2010-05-19 13:35 达奇 阅读(170) 评论(0) 推荐(1) 编辑

摘要: 判断文件夹大小using System;using System.Collections.Generic;using System.Text;using System.IO;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { string Path = @"D:\Program Files\神鬼传奇"; long dt1 = DateTime.Now.ToFileTime(); C... 阅读全文

posted @ 2010-05-19 10:18 达奇 阅读(390) 评论(0) 推荐(1) 编辑

2010年5月18日

摘要: 禁止修改FileUpload<asp:FileUpload ID="FileUpload1" onkeydown= "event.returnValue=false; " onpaste= "return false " runat="server" /> 阅读全文

posted @ 2010-05-18 15:55 达奇 阅读(181) 评论(0) 推荐(1) 编辑

摘要: gridview二次加载样式丢失解决方法:Response.Write("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>");Response.Write("<script>alert('删除成功')</script>"); 阅读全文

posted @ 2010-05-18 14:31 达奇 阅读(333) 评论(0) 推荐(1) 编辑

摘要: onClick="return confirm('是否删除此条记录?')" 阅读全文

posted @ 2010-05-18 10:29 达奇 阅读(166) 评论(0) 推荐(0) 编辑

摘要: 集成快递查询<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <HEAD><TITLE>快递查询</TITLE><META http-equiv=Content-Type content=tex 阅读全文

posted @ 2010-05-18 00:36 达奇 阅读(1204) 评论(1) 推荐(0) 编辑

摘要: 【转】由于启动用户实例的进程时出错,导致无法生成 SQL Server 的用户实例。该连接将关闭转载一篇超经典文章,如果你碰到过此问题并且为此大费周折也不能解决此问题的话,你看了这篇文章会吐血的。--------------------------------------------------------------------------------由于启动用户实例的进程时出错,导致无法生成 SQL Server 的用户实例。该连接将关闭。其英文版本的相同问题的错误信息是:“Failed to generate a user instance of SQL Server due to a 阅读全文

posted @ 2010-05-18 00:34 达奇 阅读(978) 评论(0) 推荐(0) 编辑

2010年5月17日

摘要: 给控件做数字签名之一:将控件打包为Web发布包微软代码签名证书使用指南 http://www.wotrust.com/support/signcode_guide.htm签名重要性:http://www.wotrust.com/FAQ/whySigning.htm中国数字认证网 http://www.ca365.com/SSL开放论坛 » 软件代码签名 http://www.openssl.com.cn/forum-22-1.htmlhttp://www.cnblogs.com/babyt/给控件做数字签名之一:将控件打包为Web发布包我做了一个WebRtf的控件,主要是封装了Ric 阅读全文

posted @ 2010-05-17 20:50 达奇 阅读(505) 评论(0) 推荐(0) 编辑

摘要: 迅雷API接口//ThunderEng.AddTask("下载地址", "另存文件名", "保存目录","任务注释","引用地址","开始模式", "只从原始地址下载","从原始地址下载线程数") '添加下载任务 //ThunderEng.CommitTasks()'提交下载任务 // 参数名 含义 //pURL 目标URL,必须参数 //pFileName 另存名称,默认为空,表示由迅雷处理,可选参数 //pPath 阅读全文

posted @ 2010-05-17 18:09 达奇 阅读(2069) 评论(0) 推荐(0) 编辑

摘要: winForm无标题栏拖动窗体 protected override void WndProc(ref Message m) { base.WndProc(ref m); if (m.Msg == 0x84) { switch (m.Result.ToInt32()) { case 1: m.Result = new IntPtr(2); ... 阅读全文

posted @ 2010-05-17 18:03 达奇 阅读(874) 评论(2) 推荐(2) 编辑

摘要: 判断字符串中是否有中文/// <summary> /// 判断字符串中是否有中文 /// </summary> /// <param name="CString">字符串</param> /// <returns>true:有</returns> public bool IsChina(string CString) { bool BoolValue = false; for (int i = 0; i < CString.Length; i++) { if (Convert.ToInt32(C. 阅读全文

posted @ 2010-05-17 17:54 达奇 阅读(189) 评论(0) 推荐(0) 编辑

摘要: 去除图片中指定颜色 /// <summary> /// 去除指定颜色 /// </summary> /// <param name="file1">源文件</param> /// <param name="file2">生成文件</param> /// <param name="colorStr">颜色代码 例如:#ffffff</param> /// <returns></returns> public bool 阅读全文

posted @ 2010-05-17 17:47 达奇 阅读(1018) 评论(0) 推荐(0) 编辑

摘要: 递归生成树Treeview SqlConnection Conn = new SqlConnection("server=.;database=Test;uid=sa;pwd=sa"); DataSet ds; protected void Page_Load(object sender, EventArgs e) { Conn.Open(); this.createDataSet(); Conn.Close(); this.InitTree(tvMenu.Node... 阅读全文

posted @ 2010-05-17 17:30 达奇 阅读(365) 评论(0) 推荐(0) 编辑

摘要: 获得客户端IP private string GetClientIP() { string result = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (null == result || result == String.Empty) { result = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"... 阅读全文

posted @ 2010-05-17 17:28 达奇 阅读(178) 评论(0) 推荐(0) 编辑

摘要: 模仿微软的一个拷贝文件功能/// <summary> /// 文件拷贝 /// </summary> /// <param name="file1">源文件</param> /// <param name="file2">目标文件</param> /// <param name="type">1,跳过,2,替换,3,重命名为例如***(1).txt</param> public static void copyTo(string file1 阅读全文

posted @ 2010-05-17 17:26 达奇 阅读(195) 评论(0) 推荐(0) 编辑

摘要: 不同数据源最快导入方式using System.Data.SqlClient;using System;class Program{ static void Main() { string connectionString = GetConnectionString(); using (SqlConnection sourceConnection = new SqlConnection(connectionString)) { sourceConnection.Open(); ... 阅读全文

posted @ 2010-05-17 16:58 达奇 阅读(203) 评论(0) 推荐(0) 编辑

摘要: 读取EXCEL所有列名private static void getExcelFileInfo(string Path) { string strConn = " Provider=Microsoft.Jet.OLEDB.4.0; " + " Data Source= " + Path + " ; " + " Extended Properties=Excel 8.0; "; System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbCo 阅读全文

posted @ 2010-05-17 16:55 达奇 阅读(4310) 评论(0) 推荐(0) 编辑

摘要: 获取MAC地址 /// <summary> /// 获取MAC地址 /// </summary> /// <returns></returns> public static string[] GetMacAddress() { ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration"); ManagementObjectCollection moc = mc.GetInst... 阅读全文

posted @ 2010-05-17 15:55 达奇 阅读(247) 评论(0) 推荐(0) 编辑

2010年5月14日

摘要: 各位有没有碰到在日常工作中经常在路径设置的时候把 "~/ 、./ 、../ 、 / 、http://www.cnblogs.com/"这些符号搞混搞乱了?偶尔还会因路径的问题郁闷了半天 还以为是程序上出了问题了。以下我是转自--脚本之家 里的一篇技文,略作修改,以备不时只需,各位有需要的也可参考参考,有错的也请各位指出。 比如你的工程是Webapplication1(url是:http://localhost/webapplication1/webform1.aspx) Request.ApplicationPath 就是/Webapplication1 如果是站点就直接返 阅读全文

posted @ 2010-05-14 17:14 达奇 阅读(1004) 评论(0) 推荐(2) 编辑

上一页 1 ··· 5 6 7 8 9 10 11 下一页