摘要: winver---------检查Windows版本 wmimgmt.msc----打开windows管理体系结构(WMI) wupdmgr--------windows更新程序 wscript--------windows脚本宿主设置 write----------写字板 winmsd---------系统信息 wiaacmgr-------扫描仪和照相机向导 winchat--------XP... 阅读全文
posted @ 2009-11-30 11:37 独行剑 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 错误提示:访问 IIS 元数据库失败。 说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Web.Hosting.HostingEnvironmentException: 访问 IIS 元数据库失败。 用于运行 ASP.NET 的进程帐户必须具有对 IIS 元数据库(如 IIS://serv... 阅读全文
posted @ 2009-11-13 16:43 独行剑 阅读(165) 评论(0) 推荐(0) 编辑
摘要: c# 获取字符串中的数字 /// /// 获取字符串中的数字 /// /// 字符串 /// 数字 public static decimal GetNumber(string str) { decimal result = 0; if (str != null && str != string.Empty) { // 正则表达式剔除非数字字符(不包含小数点.) str =... 阅读全文
posted @ 2009-11-12 16:52 独行剑 阅读(1189) 评论(0) 推荐(0) 编辑
摘要: .ArrayList类ArrayList类主要用于对一个数组中的元素进行各种处理。在ArrayList中主要使用Add、Remove、RemoveAt、Insert四个方法对栈进行操作。Add方法用于将对象添加到 ArrayList 的结尾处;Remove方法用于从 ArrayList 中移除特定对象的第一个匹配项;RemoveAt方法用于移除 ArrayList 的指定索引处的元素;Insert... 阅读全文
posted @ 2009-11-12 12:08 独行剑 阅读(3372) 评论(0) 推荐(0) 编辑
摘要: ref和out的区别在C# 中,既可以通过值也可以通过引用传递参数。通过引用传递参数允许函数成员更改参数的值,并保持该更改。若要通过引用传递参数, 可使用ref或out关键字。ref和out这两个关键字都能够提供相似的功效,其作用也很像C中的指针变量。它们的区别是:1、使用ref型参数时,传入的参数必须先被初始化。对out而言,必须在方法中对其完成初始化。 2、使用ref和out时,在方法的参数和... 阅读全文
posted @ 2009-11-12 11:23 独行剑 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 标准控件1 btn Button 2 chk CheckBox 3 ckl CheckedListBox 4 cmb ComboBox 5 dtp DateTimePicker 6 lbl Label 7 llb LinkLabel 8 lst ListBox 9 lvw ListView 10 mtx MaskedTextBox 11 cdr MonthCalendar 12 icn Notif... 阅读全文
posted @ 2009-11-12 10:01 独行剑 阅读(1370) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <meta ht... 阅读全文
posted @ 2009-11-11 15:17 独行剑 阅读(538) 评论(0) 推荐(0) 编辑
摘要: 方法很简单,只是将DataGrid的内容输出到HtmlTextWriter流,再将流作为附件让用户下载或者用Excel打开.此方法虽然简单,但能实现功能.private void button_OutExcel_Click(object sender, System.EventArgs e){Response.Clear();   Response.Buffer= true;   Response... 阅读全文
posted @ 2009-11-11 10:02 独行剑 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 1、 foreach (Control c in this.rptTables.Controls) { CheckBox cbx = (CheckBox)c.FindControl("cbxId"); TextBox tbx = (TextBox)c.FindControl("tbxTableName"); if (cbx != null) { if (cbx.Checked == true) {... 阅读全文
posted @ 2009-11-04 09:14 独行剑 阅读(1062) 评论(0) 推荐(0) 编辑
摘要: 很多时候如果我们用DataList来控制显示的列数可能会破坏我们的布局,因为DataList会新生成一个table标签。所以我们需要Repeater来显示。下面为代码:注意红色部分应该和后台代码对应!protected int i = 1;protected void RepeaterSchoolList_ItemDataBound(object sender, RepeaterItemEvent... 阅读全文
posted @ 2009-11-04 08:51 独行剑 阅读(404) 评论(0) 推荐(0) 编辑