物以类聚 人以群分

世上本无路,走的人多了便有了路!慢慢人生路,我会一直不停是去寻找那份财富!

[置顶] DataList利用PagedDataSource来进行分页

摘要: Asp.net提供了三个功能强大的列表控件:DataGrid、DataList和Repeater控件,但其中只有DataGrid控件提供分页功能。相对DataGrid,DataList和Repeater控件具有更高的样式自定义性,所以很多时候我们喜欢使用DataList或 Repeater控件来显示数据。 实现DataList或Repeater控件的分页显示有几种方法: 1、写一个方法或存储过程,... 阅读全文

posted @ 2009-02-27 22:33 默默無語中 阅读(232) 评论(0) 推荐(0)

2012年3月28日

类与结构的区别

摘要: 1,类中的变量默认是private,结构则是public;2,class是引用类型,struct是值类型。3,结构不能从另一个类或者结构继承。也不能被继承。但是可以继承接口。4,不能在机构体中定义默认构造函数,但是可以添加构造函数。不能定义结构的无参构造函数没有析构函数。 struct Date { private int year; private Month month; private int day; public Date() ----提示错误(无参构造函数) { }}5,结构的对象不能赋值为null。6... 阅读全文

posted @ 2012-03-28 23:42 默默無語中 阅读(240) 评论(0) 推荐(0)

2009年3月1日

GridView分页-编辑-删除

摘要: 引入DB数据库:[代码]引入ASP.NET的.aspx文件:[代码]引入ASP.NET的.cs文件:[代码] 阅读全文

posted @ 2009-03-01 21:25 默默無語中 阅读(232) 评论(0) 推荐(0)

2008年6月6日

DataList修改删除

摘要: aspx网页代码:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<asp:DataListID="DataList1"runat="server"DataKeyField="ProductKey"CaptionAlign="Bottom"Cel... 阅读全文

posted @ 2008-06-06 20:15 默默無語中 阅读(1129) 评论(1) 推荐(0)

2008年5月23日

repeater分页的实现

摘要: 第一种方式: 数据库连接代码: using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.We... 阅读全文

posted @ 2008-05-23 22:49 默默無語中 阅读(1474) 评论(0) 推荐(0)

2008年5月20日

弄了一晚上研究连接字符串,给自己留个清楚的回忆~!

摘要: 数据库连接字符串:<connectionStrings><addname="AdventureWorksDWConnectionString"connectionString="DataSource=QQ123\SQL2005;InitialCatalog=AdventureWorksDW;PersistSecurityInfo=True;UserID=sa;Password=7... 阅读全文

posted @ 2008-05-20 23:15 默默無語中 阅读(183) 评论(0) 推荐(0)

2008年5月16日

[数据库连接字符串] SQL Server 2005 Compact Edition 连接字符串

摘要: SQL Native Client ODBC Driver 标准安全连接 Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; 您是否在使用SQL Server 2005 Express? 请在“Server”选项使用连接表达式... 阅读全文

posted @ 2008-05-16 13:46 默默無語中 阅读(1174) 评论(0) 推荐(0)

2008年5月11日

委托对象(收集)

摘要: 最近看到一篇来自Arul Chinnappan扼要明了的委托介绍,翻译了一下和大家共享,翻译水平和时间都有限,大家见谅。委托的定义:委托是一种在对象里保存方法引用的类型,同时也是一种类型安全的函数指针。委托的优点:压缩方法的调用。合理有效地使用委托能提升应用程序的性能。用于调用匿名方法。委托的声明:委托应使用public delegate type_of_delegate delegate_nam... 阅读全文

posted @ 2008-05-11 22:56 默默無語中 阅读(201) 评论(0) 推荐(0)

2008年5月7日

委托的笔记(整理)

摘要: 详细讲解地址:/Files/zskj008/Delegates-and-Events-in-CSharp.pdf什么是委托  首先要知道什么是委托,用最通俗易懂的话来讲,你就可以把委托看成是用来执行方法(函数)的一个东西。如何使用委托  在使用委托的时候,你可以像对待一个类一样对待它。即先声明,再实例化。只是有点不同,类在实例化之后叫对象或实例,但委托在实例化后仍叫委托。声明,如:1namespa... 阅读全文

posted @ 2008-05-07 20:58 默默無語中 阅读(174) 评论(0) 推荐(0)
事件的应用

摘要: class PubEventArgs : EventArgs { private readonly string m_name; private readonly DateTime m_date; public PubEventArgs (string name,DateTime date ) { ... 阅读全文

posted @ 2008-05-07 00:02 默默無語中 阅读(177) 评论(0) 推荐(0)