.NET技术支持者

  博客园 :: 首页 :: 博问 :: 闪存 :: :: 联系 :: 订阅 订阅 :: 管理 ::

2006年2月15日

摘要: 一、查看虚拟目录是否存在 private bool IsExitesVirtualDir(string virtualdirname) { bool exited =false; DirectoryEntry _entry = new DirectoryEntry("IIS://localhost/W3SVC/1/Root"); DirectoryEntries _entries... 阅读全文
posted @ 2006-02-15 10:54 LDAR泄漏检测与修复 阅读(1095) 评论(1) 推荐(0) 编辑

摘要: using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.IO;using System.Xml; namespace MyWindows{ /**//// /// 这个示例演示如何把Office文件编... 阅读全文
posted @ 2006-02-15 10:53 LDAR泄漏检测与修复 阅读(1796) 评论(0) 推荐(0) 编辑

摘要: 这些代码全部写在和页面分离的代码页中(codebehind),如果要嵌入到*.aspx页面,可能 会出现问题. 1.打开新窗口 这个简单:Response.Write(@""); 2.关闭窗口 //关闭当前窗口,并提示用户时候关闭,yes关闭,no退出 Response.Write(@""); //延迟关闭窗口(下面代码表示2秒后关闭,无需确认) Response.Write... 阅读全文
posted @ 2006-02-15 10:09 LDAR泄漏检测与修复 阅读(2925) 评论(0) 推荐(0) 编辑

摘要: 导出excel打印 private void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Response.Clear(); Response.Buffer= true; Response.AppendHeader("Content-Disposition","attach... 阅读全文
posted @ 2006-02-15 09:57 LDAR泄漏检测与修复 阅读(11775) 评论(6) 推荐(0) 编辑

摘要: JavaScript在WEB编程中能起到很大的作用,将一些常用的功能写成JavaScript类库。将下面代码保存为Common.js类库功能:1.Trim(str)--去除字符串两边的空格2.XMLEncode(str)--对字符串进行XML编码3.ShowLabel(str,str)--鼠标提示功能(显示字符,提示字符)可以设置显示的提示的文字的字体、颜色、大小以及提示的背景颜色、边框等4.Is... 阅读全文
posted @ 2006-02-15 09:54 LDAR泄漏检测与修复 阅读(1284) 评论(0) 推荐(0) 编辑

摘要: datagrid中打开新窗体 DataGrid1.Attributes.Add("onclick","window.open('Print_GoodsMove.aspx?GoodsMove_ID=" + Apply_ID + "','newwindow', 'height=600, width=745, top=100, left=100, toolbar=no, menubar=no, scr... 阅读全文
posted @ 2006-02-15 09:45 LDAR泄漏检测与修复 阅读(1286) 评论(0) 推荐(0) 编辑