摘要: 发布日期: 09/19/2004 | 更新日期: 09/19/2004Chris SanoMicrosoft Corporation摘要:了解如何利用基本的 GDI 功能,从而通过 DataGrid 控件获得可视化效果。通过跨越托管边界进行调用,可以利用本机 GDI 功能来执行屏幕捕获,并最终获得拖放体验。下载 ColumnDragDataGrid.msi 文件。本页内容简介入门ScreenImage 类DraggedDataGridColumn 类ColumnDragDataGrid 类列跟踪重写 DataGrid 的 OnPaint 方法小结简介几个月以前,当我初到 Microsoft 工 阅读全文
posted @ 2004-10-26 19:59 leonardleonard 阅读(177) 评论(0) 推荐(0) 编辑
摘要: turnmissile 的 Blog http://blog.csdn.net/turnmissile/Microsoft已经把正则表达式的规则收录在了msdn里面了,有兴趣的朋友可以自己去研究一下(ms-help://MS.MSDNQTR.2003OCT.1033/cpgenref/html/cpconRegularExpressionsLanguageElements.htm),这里罗列一些我找到的语法元素功能表,大家自己研究吧!转意字符表Escaped characterDescriptionordinary charactersCharacters other than . $ ^ { 阅读全文
posted @ 2004-10-26 19:58 leonardleonard 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 改成这样:string str="script language='javascript'alert('省局数据不能进行修改!');/script";Page.RegisterStartupScript("dd",str);提示成功后转到别的页面Response.Write("scriptwindow.alert('提示语句');window.location='abc.aspx'/script"); 阅读全文
posted @ 2004-10-26 19:48 leonardleonard 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 作者:网际浪子专栏(曾用名littlehb) http://blog.csdn.net/littlehb/适用于:Microsoft ASP.NET摘要:asp.net动态生成html页面,适用简介此功能适用于后台数据库功能不强的web站点,即大部分文本不是存放在数据库的记录中,而是放在html文件或者xml文件中,仅仅把索引放到数据库中,如文章标题、类别、查询关键字等。这样适合于后台没有诸如MS Sql Server这样的数据库支持的Web站点。适用于新闻发布系统,比如sina、163等都是采用动态生成html页面的。适用于需动态定制页面的程序。比如论坛、聊天室等。可以加载定制好的html页 阅读全文
posted @ 2004-10-26 19:47 leonardleonard 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 作者:网际浪子专栏(曾用名littlehb) http://blog.csdn.net/littlehb/一,服务器上装有CA(Certificate Server) 1,服务器上安装CA Win2000中带有CA的安装程序。单击Start,Control Pannel Add/Remove Programs兵单击Add/Remove Windows Compenents。当Windows Component Wizard出现时,选择证书服务(Certificate Services)。下一步中,安装需要指出服务器授权的类型,一般作为一个独立的Web服务器,选择Stand-alone root 阅读全文
posted @ 2004-10-26 19:44 leonardleonard 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 作者:木子 http://blog.csdn.net/derny/1、把AllowPaging属性设置为true 并设置PageSize的大小2、在html页面中设置datagrid的属性OnPageIndexChanged="DataGrid_Page" ////DataGrid_Page 为点击页数的时候激发的事件 3、在程序中加入代码如下:public void DataGrid_Page(object sender,DataGridPageChangedEventArgs e){DataGrid1.CurrentPageIndex=e.NewPageIndex;BindData();/ 阅读全文
posted @ 2004-10-26 19:43 leonardleonard 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 作者:张老三的专栏 http://blog.csdn.net/billy_zh/在一些应用中,希望将模式对话框的值回送(PostBack)到服务端,也就是执行一个服务端操作,从而刷新页面。举个例子:比方说新建一个订单,此时希望能在模式对话框中选择产品,并将产品的ID返回,同时刷新订单中的产品项,解决的方法有多种,这里只介绍执行服务器操作的方法。要将客户端数据回送(PostBack)到服务端并执行相应操作,显然必须提交form并设置隐藏域__EVENTTARGET的值,好在asp.net已为我们完成了这些,只要以合适的参数调用__doPostBack就可以了。另一个问题是如何把模式对话框的值也传 阅读全文
posted @ 2004-10-26 19:40 leonardleonard 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 作者:网际浪子专栏(曾用名littlehb) http://blog.csdn.net/littlehb/方法一:使用模版列我们在绑定好数据的DataGrid增加一个模版列,在列中放置一个按钮asp:TemplateColumnItemTemplateasp:Button id="btnDelete" runat="server" Text="删除"/asp:Button/ItemTemplate/asp:TemplateColumn然后我们在DataGrid的ItemDataBound中添加以下代码switch(e.Item.ItemType){case(ListIt 阅读全文
posted @ 2004-10-26 19:37 leonardleonard 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 作者:网际浪子专栏(曾用名littlehb) http://blog.csdn.net/littlehb/我用的是一种很笨的方法,但可以帮助初学者了解访问XML节点的过程。已知有一个XML文件(bookstore.xml)如下:?xml version="1.0" encoding="gb2312"?bookstore book genre="fantasy" ISBN="2-3631-4" titleOberon's Legacy/title authorCorets, Eva/author price5.95/price /book/booksto 阅读全文
posted @ 2004-10-26 19:36 leonardleonard 阅读(180) 评论(0) 推荐(0) 编辑
摘要: function checkCH(){var str=txtPwd.value;var c = /[\u4e00-\u9fa5]/;if(c.test(str)){alert("不能输入中文。");return false;}return true;} 阅读全文
posted @ 2004-10-26 19:34 leonardleonard 阅读(95) 评论(0) 推荐(0) 编辑
摘要: body onkeydown="if (event.keyCode==13) {document.all.button2.click()}"下面的五种方法都可以帮你解决这种问题1.script language=javascriptfunction document.onkeydown(){ if (event.keyCode == 13) { if (event.srcElement == document.getElementById('%=txtEmpCode.ClientID%')) document.getElementById('%=BtnQry.ClientID% 阅读全文
posted @ 2004-10-26 19:34 leonardleonard 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 由于项目的需要不允许系统在提交之后,按IE的后退按钮进行再次提交。试试了一下在 .NET中通过如下语句Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);就可以使页面的缓存失效,每次都需要获取新页面。scripthistory.forward();/script最灵! 阅读全文
posted @ 2004-10-26 19:33 leonardleonard 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 常用javascript函数(一) 作者: 无名 类别: HTML/JavaScript 日期: 2001-11-11 21:19:11 /********************************************************************************** EO_JSLib.js* javascript正则表达式检验**********************************************************************************///校验是否全由数字组成function isDigit(s){va 阅读全文
posted @ 2004-10-26 19:31 leonardleonard 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 经常在网络上四处载东西,有时碰到直接拷贝一个类似http://193.100.100.56/TestWebSolution/WebApplication1/test.rar地址准备下载test.rar文件时,却被告知没有登录或者直接跳转到其他页面的情况,然后等登录后直接下载该文件。要实现上面情况,在.NET世界里是比较容易的。1、 首先创建一个类库项目ClassLibrary1,实现如下(点这里查看):using System;using System.Web; // 引用System.Web组件namespace ClassLibrary1{ public class MyHandler : 阅读全文
posted @ 2004-10-26 19:29 leonardleonard 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Response.Write("script language='javascript'window.opener.location=window.opener.location.href;/script")第一种方案是:file a.htmfunction OpenDialog(url,param){return window.open(url,param, "DialogWidth:450px;DialogHeight:450px;help:no;status:no");}file b.htmscript language="javascript"function js_do( 阅读全文
posted @ 2004-10-26 19:28 leonardleonard 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 作者:网际浪子专栏(曾用名littlehb) http://blog.csdn.net/littlehb/上传图片,要求图片200100象素,大小小于2M,如果图片不符合要求,不能上传,否则上传图片,上传以后对图片按系统日期动态命名,保留路径到数据库里。private void Button1_Click(object sender, System.EventArgs e){if(File1.PostedFile.ContentType.ToUpper().IndexOf("IMAGE")-1){System.Drawing.Image img= System.Drawing.Image.F 阅读全文
posted @ 2004-10-26 19:27 leonardleonard 阅读(191) 评论(0) 推荐(0) 编辑
摘要: EMBED SRC="MY_LIFE.RPM" WIDTH=300 HEIGHT=134 Tip:SRC是可以省略的,当mime Type 参数如下时:EMBED ...,TYPE="audio/x-pn-realaudio-plugin",...,这样做会产生不可预料的结果,因此强烈推荐你包含SRC属性,并且提供一个空的文件的文件名。 阅读全文
posted @ 2004-10-26 19:24 leonardleonard 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 将一些HTML替换掉eg:strContent=strContent.Replace("&","&");strContent=strContent.Replace("'","''");strContent=strContent.Replace("","<");strContent=strContent.Replace("",">");strContent=strContent.Replace("chr(60)","<");strContent=strContent.Replace("chr(37)",">");strContent=strContent.Replace 阅读全文
posted @ 2004-10-26 19:23 leonardleonard 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Response.Write("scriptwindow.opener=null;window.close();/script") ; 阅读全文
posted @ 2004-10-26 19:22 leonardleonard 阅读(119) 评论(0) 推荐(0) 编辑
摘要: public static long DirSize(DirectoryInfo d) { long Size = 0; // Add file sizes. FileInfo[] fis = d.GetFiles(); foreach (FileInfo fi in fis) { Size += fi.Length; } // Add subdirectory sizes. DirectoryInfo[] dis = d.GetDirectories(); foreach (DirectoryInfo di in dis) { Size += DirSize(di); } r 阅读全文
posted @ 2004-10-26 19:21 leonardleonard 阅读(98) 评论(0) 推荐(0) 编辑