2010年6月29日

JS之Window对象

摘要: 一.说明:他是JS中最大的对象,它描述的是一个浏览器窗口,一般要引用他的属性和方法时,不需要用“Window.XXX”这种形式,而是直接使用“XXX”。一个框架页面也是一个窗口。二.Window窗口对象有如下属性。 1.name 窗口的名称,由打开它的连接(<a target="...">)或框架页(<frame name="...... 阅读全文

posted @ 2010-06-29 11:08 AndyCai 阅读(49308) 评论(0) 推荐(2) 编辑

JS中document对象详解

摘要: JS中document对象详解对象属性 document.title //设置文档标题等价于HTML的<title>标签 document.bgColor //设置页面背景色 document.fgColor //设置前景色(文本颜色) document.linkColor //未点击过的链接颜色 document.alinkColor //激活链接(焦点在此链接上)的颜色 docum... 阅读全文

posted @ 2010-06-29 10:58 AndyCai 阅读(6982) 评论(1) 推荐(3) 编辑

2010年6月23日

Asp.net 写文件

摘要: string fr = System.DateTime.Now.ToString ("yyyyMMddHHmmss");string fileName = "Test-"+ fr +".txt";string path = System.Configuration.ConfigurationSettings.AppSettings["Files"]; // 文件存放目录string pathfro... 阅读全文

posted @ 2010-06-23 10:10 AndyCai 阅读(168) 评论(0) 推荐(0) 编辑

ASP.Net 执行bat

摘要: // Get the full file pathstring strFilePath = batPath; //得到bat 文件全路径名// Create the ProcessInfo objectSystem.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("cmd.exe"); //启动c... 阅读全文

posted @ 2010-06-23 10:07 AndyCai 阅读(1322) 评论(0) 推荐(0) 编辑

asp.net中执行exe应用程序

摘要: 原文:http://www.cnblogs.com/sonicit/archive/2008/04/19/1161256.html在asp.net中执行应用程序有两种方法:1、调用win32函数ShellExecute。2、用.NET Framework中的Process类。下面我分别用这两种方法执行Windows中的记事本程序notepad.exe。新建一个ASP.Net页面Default.as... 阅读全文

posted @ 2010-06-23 10:02 AndyCai 阅读(475) 评论(0) 推荐(0) 编辑

2010年6月3日

GridView Edit 和Delete

摘要: 前台: <asp:CommandField ButtonType="Image" HeaderText="Edit" EditImageUrl="~/client_support/images/edit.GIF" UpdateImageUrl ="~/client_support/images/save.gif" CancelImageUrl="~/client_support/images... 阅读全文

posted @ 2010-06-03 13:59 AndyCai 阅读(705) 评论(0) 推荐(0) 编辑

GridView RowDataBound

摘要: if (e.Row.RowType == DataControlRowType.DataRow) { if (e.Row.RowState == DataControlRowState.Normal || e.Row.RowState == DataControlRowState.Alternate) //正常查询显示 { Label lblSite = (Label)e.Row.FindCont... 阅读全文

posted @ 2010-06-03 13:55 AndyCai 阅读(233) 评论(0) 推荐(0) 编辑

通过流打开一个Excel文件

摘要: string templateExcel = "xxx.xls"; string path = Server.MapPath(@"Template\") + templateExcel; //路径 System.IO.FileInfo file = new System.IO.FileInfo(path); Response.AddHeader("Content-Disposition", "at... 阅读全文

posted @ 2010-06-03 13:43 AndyCai 阅读(212) 评论(0) 推荐(0) 编辑

2010年5月31日

常用的C#正则表达式!

摘要: 来自网络:"^\d+$" //非负整数(正整数 + 0) "^[0-9]*[1-9][0-9]*$" //正整数 "^((-\d+)|(0+))$" //非正整数(负整数 + 0) "^-[0-9]*[1-9][0-9]*$" //负整数 "^-?\d+$" //整数 "^\d+(\.\d+)?$" //非负浮点数(正浮点数 + 0) "^(([0-9]+\.[0-9]*[1-9][0-9]*)|... 阅读全文

posted @ 2010-05-31 14:33 AndyCai 阅读(166) 评论(0) 推荐(0) 编辑

2010年4月27日

Excel 读出列中的数值 为空.

摘要: 最近项目中有用到上传Excel .Excel 中列比较多,列中的数据有些为空,有些是有值的.在测试的过程中发现有时能读到列中的值,有时为空.有个和Excel 格式设置有关.如果这个列的前8行数据为空,又没有设置过格式,这时驱动就默认为文本,下面的行如果这个列有数值,就会读出为空.需要把所有要填写数值的格子设置为数值类型,Excel 才能正常读取.参考:http://msdn2.microsoft.... 阅读全文

posted @ 2010-04-27 09:32 AndyCai 阅读(520) 评论(0) 推荐(0) 编辑

导航