C#通用类库--DOS常用命令
摘要://类名:EcanDOS//作用:DOS常用命令操作//作者:刘典武//时间:2010-12-01using System;using System.Collections.Generic;using System.Text;using System.IO;using System.Diagnostics;using System.Runtime.InteropServices;namespace Ecan{ public class EcanDOS { //引入API函数 [DllImportAttribute("user32.dll")] private static
阅读全文
posted @
2012-03-24 14:58
西湖浪子
阅读(200)
推荐(0)
MicrosoftAjaxWebForms.js
摘要://----------------------------------------------------------// Copyright (C) Microsoft Corporation. All rights reserved.//----------------------------------------------------------// MicrosoftAjaxWebForms.jsType.registerNamespace("Sys.WebForms");Sys.WebForms.BeginRequestEventArgs = functio
阅读全文
posted @
2011-12-22 10:50
西湖浪子
阅读(789)
推荐(0)
转 Asp.net Ajax ASP.NET 局部更新PostBack的客户端调用过程
摘要:<script type="text/javascript">Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('form1'));Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tUpdatePanel1'], [], [], 90);</script> 看一下MicrosoftAjaxWebForms
阅读全文
posted @
2011-12-21 17:56
西湖浪子
阅读(458)
推荐(0)
svn版本信息的删除
摘要:问题:从公司svn下,检出代码,包含svn信息,它是可以同步的包括很多的svn信息。但是我要这些代码只是看看,并在利用它在本地svn服务器上,且往往包含这些svn版本信息的文件占空间,拷贝速度慢。 解决: 1、在公司svn上再 导出一份 导出和检出是不同的,导出不包含版本信息,检出则包含版本信息 2、因为代码比较多,有2G多,导出比较慢 本地拷贝一份含svn版本信息的文件,想办法删除所有版本信息。 最简单的方法是,搜索所有.svn文件,然后删除。 查了哈网上的,有三个方法如下: 一、在linux下 删除这些目录是很简单的,命令如下 find . -type d -name ".svn
阅读全文
posted @
2011-09-23 11:27
西湖浪子
阅读(178)
推荐(0)
异步图片资源
摘要://<img xxxxsrc="XXXX.jpg">(function(e) { Snda = e.Snda = e.Snda || {}; Snda.extend = function(a, b, c) { for (prop in b) { if (c == false && a[prop] != null) continue; a[prop] = b[prop] }; return a }; Snda.Utility = Snda.Utility || {}; Snda.Utility.Event = Snda.Utility.Event
阅读全文
posted @
2011-09-09 16:57
西湖浪子
阅读(206)
推荐(0)
js 中文编码 工具
摘要:<!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><meta http-equiv="Content-Type" content="text/html; charset=utf-
阅读全文
posted @
2011-08-06 21:41
西湖浪子
阅读(199)
推荐(0)
中国省份与城市数据插入 .
摘要:if exists (select * from sysobjects where id = OBJECT_ID('[province]') and OBJECTPROPERTY(id, 'IsUserTable') = 1) DROP TABLE [province]CREATE TABLE [province] ([id] [int] NOT NULL,[provinceID] [nvarchar] (12) NOT NULL,[province] [nvarchar] (80) NOT NULL)ALTER TABLE [province] WITH NO
阅读全文
posted @
2011-08-06 19:10
西湖浪子
阅读(210)
推荐(0)
网页定时信息提醒
摘要:<div id="popup" style="display:none" class="pay_attention layoutfix"><a href="javascript:void(0);" onclick="this.parentNode.style.display='none';" title="关闭" class="close_attention"></a><div class=&quo
阅读全文
posted @
2011-08-05 10:08
西湖浪子
阅读(225)
推荐(0)
ASP.NET中使用System.Net.Mail发邮件
摘要:一、一般的邮件发送public static void SendMail()//普通的邮件发送{ MailAddress from = new MailAddress("FromEmail@website.com"); MailAddress to = new MailAddress("ToEmail@website.com"); MailMessage message = new MailMessage(from, to); message.Subject = "邮件标题"; message.Body = "邮件内容&qu
阅读全文
posted @
2011-07-11 17:15
西湖浪子
阅读(358)
推荐(0)
判断操作系统版本
摘要:If (Environment.OSVersion.Platform <> PlatformID.Win32NT) Then Throw New PlatformNotSupportedException(SR.GetString("RequiresNT")) End If If ((Environment.OSVersion.Version.Major >= 7) OrElse ((Environment.OSVersion.Version.Major = 6) AndAlso (Environment.OSVersion.Version.Minor &
阅读全文
posted @
2011-07-11 15:36
西湖浪子
阅读(193)
推荐(0)
如何在jQuery中使用 setInterval,setTimeout
摘要:当遇到setInterval,setTimeout与jquery混用的问题 时,直接按JavaScript中的语法写并不起作用,有以下两种解决方法。方法1. 直接在ready中调用其他方法,会提示缺少对象的错误,应用jQuery的扩展可以解决这个问题。$(document).ready(function(){$.extend({ show:function(){ alert("ready"); }});setInterval("$.show()",3000);});方法2. 指定定时执行的函数时不要使用引号和括号。function show(){ ale
阅读全文
posted @
2011-06-15 14:11
西湖浪子
阅读(298)
推荐(0)
C# WebRequest发起Http Post请求模拟登陆并cookie处理示例
摘要:CookieContainer cc=new CookieContainer();string url = “http://mailbeta.263.net/xmweb”;HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);request.Method = “POST”;request.ContentType = “application/x-www-form-urlencoded”;request.CookieContainer=cc;string user=”user”; //用户名string pass=”pas
阅读全文
posted @
2011-06-11 11:06
西湖浪子
阅读(696)
推荐(0)
GridView添加统计行.net
摘要:前提:设置属性ShowFooter="True"方法一:使用SQL查询统计出合计值,在绑定GridView时让其结果赋于一个DataTable(全局变量),然后在RowDataBound事件中程序代码:if (e.Row.RowType == DataControlRowType.Footer){e.Row.Cells[0].Text = "合计";e.Row.Cells[3].Text = dtSum.Rows[0][0].ToString();e.Row.Cells[4].Text = dtSum.Rows[0][1].ToString();e.Ro
阅读全文
posted @
2011-06-08 10:43
西湖浪子
阅读(186)
推荐(0)
解决window.showModalDialog在Firefox无法支持
摘要:在网页程序中,有时我们会希望使用者按下按钮后开启一个保持在原窗口前方的子窗口,而在IE中,我们可以使用showModalDialog来达成,语法如下 :vReturnValue = window.showModalDialog(sURL [, vArguments] [, sFeatures]) 范例:window.showModalDialog("openwin.html","Arguments","dialogHeight: 200px; dialogWidth: 200px; dialogTop: 10px; dialogLeft: 10
阅读全文
posted @
2011-05-30 11:20
西湖浪子
阅读(309)
推荐(0)
分享一些我在开发过程中用过的资源 (转)
摘要:以下所提到的控件/组件均为开源或免费的。1,ComboBox控件: Upgrade Your Select Element to a ComboBox2,DateTimePicker控件: GrayMetterSoft3,TabStrip控件: A simple ASP.NET Web TabStrip User Control4,Grid控件: XGrid5,数据结构Tree: A Generic Tree Collection6,csv文件<->DataTable: CSV file parser and writer in C#7,邮件发送: DotNetOpenMail8,
阅读全文
posted @
2011-05-14 00:23
西湖浪子
阅读(217)
推荐(0)
C# Mail POP
摘要:最近在郵件發送失敗率的統計,要從GMail中抓取郵件發送失敗信息;在網上找了一段C#代碼就是抓不到數據using System;using System.Net.Sockets;using System.Net;using System.Security.Cryptography;using System.IO;using System.Data;namespace GetMail{ /// <summary> /// 获取邮件(的)类 /// zgke@sina.com /// qq:116149 /// </summary> public class POP3 {
阅读全文
posted @
2011-05-14 00:02
西湖浪子
阅读(380)
推荐(0)
c#实现动态创建二级域名,比如当用户注册成功后就会给他一个网址http://name.site.com,博客网站上都有这种功能.
摘要:第一步:把域名设置成泛解析. 就是把*.域名 解析到你的主机,是否支持泛解析,请查看你的域名商说明. 第二步:IIS设成的时候不要绑定域名.注意一台服务器里只能有一个站点不绑定域名 就是*.域名的默认访问页. 第三步:默认页里加入以下代码:关键部分如下: string sURL=context.Request.ServerVariables[ "HTTP_HOST "].ToLower(); sURL就是获取的域名部分 . xxx.域名 对应的xxx就是用户名.然后查库里的记录,如xxx对应的是www.csd.net那就就把 它转向到www.csdn.net 或者写一个框架
阅读全文
posted @
2011-04-14 16:20
西湖浪子
阅读(604)
推荐(0)
C#验证码识别类
摘要:usingSystem; usingSystem.Collections.Generic; usingSystem.Text; usingSystem.Collections; usingSystem.Drawing; usingSystem.Drawing.Imaging; usingSystem.Runtime.InteropServices; namespaceBallotAiying2 ...{ classUnCodebase ...{ publicBitmapbmpobj; publicUnCodebase(Bitmappic) ...{ bmpobj=newBitmap(pic);
阅读全文
posted @
2011-04-06 17:05
西湖浪子
阅读(572)
推荐(0)
CSS实现网页内容分页打印
摘要:在需要分页的地方加上“page-break-before:always”或“page-break-after:always”即可,相应的,有两种代码:利用“page-break-before:always”:第一页的内容<p style="page-break-before:always;">第二页的内容</p><p style="page-break-before:always;">第三页的内容</p>利用“page-break-after:alwaysR
阅读全文
posted @
2011-02-18 12:49
西湖浪子
阅读(217)
推荐(1)
sql 还能这样写
摘要:with o as (select orderid,ISNULL(UTaxRate,0) AS UTaxRatefrom [order] (nolock)where sourceid not in (21,22)), l as (select o.orderid,oit.orderlineitemid,cast(o.UTaxRate as decimal(10,8)) as UTaxRate,cast(ISNULL(oit.TaxRate,0) as decimal(10,8)) as LineRatefrom ojoin dbo.Order_Line_Item oi (nolock)on o
阅读全文
posted @
2011-02-17 11:04
西湖浪子
阅读(138)
推荐(0)