-
C# 动态代码生成控件后其他事件不能获取该控件的值
1. 新建 web 项目,添加两个 Button 控件,结果如图。 2.Button 按钮控件点击事件代码如下 protectedvoid Button1_Click( object sender, EventArgs e){ TextBox t = newTextBox(); t.ID = " test " ; t.Text = " 测试框 " ; t.Attributes.Add( " runat " , " server "...
2018-06-22 07:29:37
-
匿名对象解析
class Program { static void Main(string[] args) { Listobject obj = new Listobject(); obj.Add(new { aa=1,bb=1}); obj.Add(new { aa = 1, bb = 2 }); var objs = obj.Select(t = t.Cast(new { aa = 0, bb = 0 })).ToList(); Console.ReadKey(); } } static class...
2018-06-22 07:29:35
-
事件管理
using System; using System.Collections.Generic; namespace CustomUtils{ /// summary /// 事件管理器 /// /summary public class EventManager { private readonly static Dictionary string , ActionEventMessageArgs eventTask = new Dictionary string , ActionE...
2018-06-22 07:29:36
-
ADO.NET基础学习 二(Command对象)
②command对象用来操作数据库。 (三个重要的方法:ExecuteNonQuery(),ExecuteReader(),ExecuteScalar()) ⑴以update(改数据)为例,用到 ExecuteNonQuery() 方法 (执行SQL语句,返回受影响行) private void button2_Click( object sender, EventArgs e) { SqlConnectio...
2018-06-22 07:29:32
-
FastReport.Net
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using FastReport;using FastReport.Data;using FastReport.Editor;using FastReport.Design;usin...
2018-06-22 07:29:32
-
.net 公共基础类
using WL.Infrastructure.Http;using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Text.RegularExpressions;using System.Web;using System.Drawing;using System.Drawing.Imaging;using System.Drawi...
2018-06-22 07:29:31
-
IEnumerable,ICollection,IList接口问题
最近有一个疑问:IList已经继承了ICollectionT,而ICollectionT继承了IEnumerableT, IEnumerable,那为什么IList还要继承IEnumerableT, IEnumerable? 于是我自己写了接口测试:用dnSpy反编译看到,Test3接口继承了Test1,Test2。这就说明接口其实不支持跟类一样的继承...
2018-06-22 07:29:31
-
编程语言及计算机硬件基础
1、什么是编程语言? 程序员与计算机沟通的介质 2、什么是编程? 程序员基于某种编程语言的语法格式将想让计算机所做的事写到文件中让计算机执行,编程的结果就是文件,文件的内容就是程序; 3、为什么要编程? 让计算机代替人类工作,解放人力 4,、计算机硬件基础 (1...
2018-06-22 07:29:29
-
.net自定义错误页面实现升级篇
问题描述: 在上一篇博文 “.net自定义错误页面实现” 中已经介绍了在.net中如何实现自定义错误页面实现(有需要者可以去上一篇博文了解),单纯按照上一篇博文那样设置,能够实现所有请求的异常自定义跳转,但是这样又会产生一个问题:当通过ajax提交请求获取接口提交...
2018-06-22 07:29:25
-
ADO.NET基础学习 一(连接数据库)
(记录下方便自己复习) 概念 简单地理解为用来连接数据库的类。 工作流程 ①Connection对象用来连接数据库。 两种连接方式:Windows身份验证 / sqlserver验证 private void button1_Click( object sender, EventArgs e) { try { // string Str = "server=.;Initial cata...
2018-06-22 07:29:29
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash




