- 博客(13)
- 收藏
- 关注
原创 WPF 实现异步调用
在WPF中,实现异步调用的代码如下: System.Windows.Threading.Dispatcher.Invoke( new Action(()=> { CallMethodName(); //要异步调用的方法或异步执行的语句 }), System.Windows.Threading.DispatcherPriority.Background);
2015-10-21 13:46:49
3483
原创 frameset 获取框架对像javascript实现
window.parent.frames["框架名"]window.parent.frames.item(索引号)
2008-12-19 16:45:00
561
原创 线程间操作无效:从不是创建控件 "xxxx" 的线程访问它。
错误症状如下图: 解决方按:将如下语句加入到窗体构造方法中即可。Control.CheckForIllegalCrossThreadCalls = false;
2008-10-10 11:12:00
736
原创 Winform的Combox添加value
在做Wiform的时候发现Combox没有value选项于是在网上找了一些资料,成功加上了Value。 首先添加一个ComboxItem类:using System;using System.Collections.Generic;using System.Text;namespace Test{ public class ComboBoxItem
2008-09-03 22:06:00
4101
原创 通过WinAPI打开文件夹浏览源码
通过调用WinApi打开Windows浏览文件夹. 调用方法: DirectorySelect dir = new DirectorySelect(); string filePath = dir.GetDirectory();源码:using System;using System.Collections.Generic;us
2008-09-02 21:18:00
1571
原创 实现分页的存储过程
我们在做程序开发的时候有时候会经常要用到GridView、DataList等控件,当然GridView它本身就带有分页的功能,可是DataList的分页就没有提供,我们就不得不用代码OR存储过程来实现,然而当显示的数据量非常大的时候也有必要用到存储过程对其进行分页显示,下面是实现分页的一种方法: 以Products表进行示例:CREATE PROCEDURE [Pr
2008-03-29 16:14:00
672
原创 正则表达式基础知识
正则表达式基础知识 出自:梦幻Dot Net 的 正则表达式基础知识 一个正则表达式就是由普通字符(例如字符 a 到 z)以及特殊字符(称为元字符)组成的文字模式。该模式描述在查找文字主
2008-02-22 14:41:00
710
原创 转载 在Web页面上直接打开、编辑、创建office文档
如何在Web页面上直接打开、编辑、创建Office文档 有朋友询问如何在Web页面上做到像SharePoint中的效果一样,能直接激活客户端的Word来打开.doc文件,而不是类似直接点击.doc文档链接时Word在IE中被打开那样。想想这个问题应该很多人都会感兴趣,所以干脆写一篇blog来大致描述一下方法。在安装Office2003以后,有一个ActiveX控件被安装到了系统中,这个控件
2008-02-19 14:55:00
1227
原创 C#动态成生并打开网页
下面是通过C#调用模板页(test.html),动态的生成静态的HTML网页的源码。页面加载时调用方法清除不在最近某一时间断生成的网页。using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Secur
2007-10-09 09:37:00
1291
原创 TreeView存储过程动态绑定树控件
这是从同事那里得来的代码,当然他也是从网上看来的。呵呵!整理了一下,这个方法绑定速度远远高于上一种(递归绑定)绑定树控件的方法。下面是CS中的代码:using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Sec
2007-09-27 22:36:00
2178
3
原创 TreeView递归法绑定树控件
下面是用递归法绑定到树控件的Demo: using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebContr
2007-09-27 20:10:00
2002
原创 Javascript实现日期的连动选择
今天无意间闯进一网站看到了几个最常用的日历控件,很有头趣的尝试了一下下面的代码。觉得挺简单的贴出来给大学分享下:html>body>form>select id=year onchange=toDate()>script>for(i=1970;i2010;i++)document.write(""+i+"")script>select>select id=month onchange=to
2007-09-27 13:34:00
919
原创 GridView行选择事件,单击GridView中某一行任意位置提出这条记录
using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.
2007-09-27 09:41:00
8375
4
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人