摘要: 1、在项目的引入中,引入Microsoft.Office.Interop.Excel程序集,最好的11.0版本的。2、在源文件中的using 中,使用using Excel = Microsoft.Office.Interop.Excel;3、类似函数: /// <summary> /// 导出Excel的方法 /// </summary> private void ExportExcel(DataGridView ds) { //DataSet ds = ;//数据源 if (ds == null) return; string saveFileName = &quo 阅读全文
posted @ 2011-07-19 08:35 徐一贺 阅读(561) 评论(0) 推荐(1) 编辑
摘要: namespace YongFa365.Validator{ using System; using System.Text.RegularExpressions; public class Validator { 验证邮箱#region 验证邮箱 /**//// <summary> /// 验证邮箱 /// </summary> /// <param name="source"></param> /// <returns></returns> public static bool IsEmail(st 阅读全文
posted @ 2011-07-18 13:55 徐一贺 阅读(1329) 评论(0) 推荐(1) 编辑
摘要: VS2008正式版序列号CDKEYVS2008正式版序列号CDKEY:PYHYP-WXB3B-B2CCM-V9DX9-VDY8T 阅读全文
posted @ 2011-07-18 13:09 徐一贺 阅读(197) 评论(0) 推荐(1) 编辑
摘要: asp.net 对xml文件的读写,添加,修改,删除操作asp.net 对xml文件的读写,添加,修改,删除操作 下面有代码调试正确 using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI. 阅读全文
posted @ 2011-07-18 13:08 徐一贺 阅读(368) 评论(0) 推荐(1) 编辑
摘要: select * from[表名] where[条件] order by newid()---随机取几条数据select Top[条数] * from[表名] where[条件] order by newid()---随机取前几条数据selectDISTINCT * from[表名] where[条件] ---过滤重复结果select DISTINCT SUBSTRING(No,0,7) as KT from T_Nos ---截取字符串 过滤重复 阅读全文
posted @ 2011-07-18 13:04 徐一贺 阅读(247) 评论(0) 推荐(1) 编辑
摘要: 各种宽度高度网页可见区域宽:document.body.clientWidth 网页可见区域高:document.body.clientHeight 网页可见区域宽:document.body.offsetWidth (包括边线的宽) 网页可见区域高:document.body.offsetHeight (包括边线的宽) 网页正文全文宽:document.body.scrollWidth 网页正文全文高:document.body.scrollHeight 网页被卷去的高:document.body.scrollTop 网页被卷去的左:document.body.scrollLeft 网页正文 阅读全文
posted @ 2011-07-18 13:02 徐一贺 阅读(281) 评论(0) 推荐(1) 编辑
摘要: WebRequest req = WebRequest.Create("http://www.123cha.com/ip/?q=15804888888"); WebResponse result = req.GetResponse(); Stream ReceiveStream = result.GetResponseStream(); StreamReader readerOfStream = new StreamReader(ReceiveStream,System.Text.Encoding.GetEncoding("UTF-8")); strin 阅读全文
posted @ 2011-07-18 13:01 徐一贺 阅读(346) 评论(0) 推荐(1) 编辑
摘要: 静态页传值给动态页ASP.NET静态页面内<form action="接受传值的页面路径" method="post" target="_blank "name="searchFormToPro" id="Form1" onsubmit="javascript:return CheckForm1();"><input id="jobKw" name="jobKw" type="text" /> 阅读全文
posted @ 2011-07-18 13:00 徐一贺 阅读(298) 评论(0) 推荐(1) 编辑
摘要: 通用JS脚本--------------函数检索--------------trim函数:trim()lTrim()rTrim()校验字符串是否为空:checkIsNotEmpty(str)校验字符串是否为整型:checkIsInteger(str)校验整型最小值:checkIntegerMinValue(str,val)校验整型最大值:checkIntegerMaxValue(str,val)校验整型是否为非负数:isNotNegativeInteger(str)校验字符串是否为浮点型:checkIsDouble(str)校验浮点型最小值:checkDoubleMinValue(str,va 阅读全文
posted @ 2011-07-18 12:57 徐一贺 阅读(1730) 评论(0) 推荐(1) 编辑
摘要: <%#Eval("日期","{0:yyyy-MM-dd}"%><img src="3/4.gif"><%#DataBinder.Eval(Container.DataItem,"date","{0:yyyy-MM-dd}")%>【menu】 Me.Menu3.Items(0).Text = "鸟人" Me.Menu3.Items(0).ChildItems(0).Text = "<img src='1.gif' 阅读全文
posted @ 2011-07-18 12:55 徐一贺 阅读(1172) 评论(0) 推荐(1) 编辑
摘要: 电话号码正则表达式(支持手机号码,3-4位区号,7-8位直播号码,1-4位分机号)((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)匹配格式:11位手机号码3-4位区号,7-8位直播号码,1-4位分机号如:12345678901、1234-12345678-1234匹配中文字符的正则表达式: [\u4e00-\u9fa5]评注:匹配中文还真是个头疼的事,有了这个表达式就好办了匹配 阅读全文
posted @ 2011-07-18 12:50 徐一贺 阅读(2631) 评论(2) 推荐(3) 编辑