摘要: Different from GridView, ListView can’t have the paging function automatically if you set the attribute “AutoPaging=true”, and this is where the DataPager comes into play. We can get the paging function for ListView easily with the help of the DataPager. We only need to put the control DataPager in 阅读全文
posted @ 2009-11-25 10:48 FangwenYu 阅读(796) 评论(0) 推荐(0) 编辑
摘要: DATABASE ACCESS WITHOUT ADO.NETYour options for database access without ADO.NET include the following:• The SqlDataSource control: The SqlDataSource control allows you to define queries declaratively. You canconnect the SqlDataSource to rich controls such as the GridView, and give your pages the abi 阅读全文
posted @ 2009-11-24 10:43 FangwenYu 阅读(344) 评论(0) 推荐(0) 编辑
摘要: To run an ASP.NET web form, the ASP.NET engine reads the entire .aspx file, generates the corresponding objects, and fires a series of events. You react to these events using thoroughly object-oriented code. Page Processing Web applications execute on the server: Web applications are stateless: In o 阅读全文
posted @ 2009-11-23 15:37 FangwenYu 阅读(392) 评论(0) 推荐(0) 编辑
摘要: Usually, to hide a control or a block in HTML, we can use the following JavaScript to set the style of the control or the block, document.getElementById(“”).style.display=”none”; or apply the following css, .some-css-name { display:none } But it will remove the space occupied by the control as well. 阅读全文
posted @ 2009-11-23 11:20 FangwenYu 阅读(213) 评论(0) 推荐(0) 编辑
摘要: Websites and Web ProjectsSomewhat confusingly, Visual Studio offers two ways to create an ASP.NET-powered web application:• Project-based development: When you create a web project, Visual Studio generates a .csproj project file (assuming you’re coding in C#) that records the files in your project a 阅读全文
posted @ 2009-11-22 12:11 FangwenYu 阅读(339) 评论(0) 推荐(0) 编辑
摘要: Differences between ASP.NET and earlier web development platforms: • ASP.NET features a completely object-oriented programming model, which includes an eventdriven, control-based architecture that encourages code encapsulation and code reuse.• ASP.NET gives you the ability to code in any supported . 阅读全文
posted @ 2009-11-21 19:59 FangwenYu 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 如果Server端处理Client端的响应需要的时间太长,这时候给用户显示另一个界面来告知用户示服务器正在处理,请用户稍等,这样显然更友好一些!解决这个需求貌似有个现成的解决方案, ASP.NET AJAX有个控件叫UpdateProgress, 用法可以参见这里。但是这个UpdateProgress有个缺点,就是它会自动对它所关联的UpdatePanel里面的所有控件(Button),也是就是它的粒度是UpdatePanel级别的,而不是具体某个控件级别的。当然,可以把要关联的控件单独放在一个UpdatePanel里面,但是这显然很不灵活。而且,UpdateProgress不会把当前的界面隐 阅读全文
posted @ 2009-11-08 21:39 FangwenYu 阅读(384) 评论(0) 推荐(0) 编辑
摘要: Abstract: 通过一个简单的 web application, 学习以下内容: (1) ListView control (2) User control (3) Handle ViewState in User control (4) FindControl() usage, especially when there is a Master page. 本文主要讲述第3部分,如何在User Control 里面处理ViewState 上一篇中提到用User Control PassRateProgressBar 来显示每个学生的及格率。表面上看,一切都好。但是当页面Postback的 阅读全文
posted @ 2009-11-01 17:24 FangwenYu 阅读(399) 评论(0) 推荐(0) 编辑
摘要: Source: http://msdn.microsoft.com/en-us/library/ms972976.aspxViewState本质: The view state of a page is, by default, placed in a hidden form field named __VIEWSTATE. This hidden form field can easily get very large, on the order of tens of kilobytes. Not only does the __VIEWSTATE form field cause slow 阅读全文
posted @ 2009-11-01 14:02 FangwenYu 阅读(651) 评论(0) 推荐(0) 编辑
摘要: HTTP是无状态的协议,在Web Server 响应页面请求之后,客户端和Web Server会断开,Web Server为该请求创建的页面对象会被销毁掉。这样可以保证Server可以最大化同时响应客户请求能力,同时也减少了对Server端内存开销的压力。但是这样缺点也是显而易见的,需要用另外方法来记住页面当前的相关状态,以便Server端作相应的处理。ASP.NET提供了以下几种方式来进行状态管理:(1) ViewState(2) QueryString(3) Customer Cookies(4) Session State(5) Application State(6) Profile. 阅读全文
posted @ 2009-10-27 22:03 FangwenYu 阅读(1420) 评论(0) 推荐(0) 编辑
摘要: Abstract: 通过一个简单的 web application, 学习以下内容: (1) ListView control (2) User control (3) Handle ViewState in User control (4) FindControl() usage, especially when there is a Master page. 本文主要讲述第二部分,即User Control的用法 需求背景: 如果想把列Pass Rate由现在的单纯的数字表示转换成进度条显示,该怎么办? ====> 这个进度条可以通过创建一个Web User Control来实现。 阅读全文
posted @ 2009-10-25 11:41 FangwenYu 阅读(206) 评论(0) 推荐(0) 编辑
摘要: Abstract: 这个读书笔记系列是关于Tom的大作《Expert Oracle Database Architecture》 Chapter 2: Architecture Overview 1. Oracle and Instance Oracle: A collection of physical operating system files or disk. Instance: b... 阅读全文
posted @ 2009-10-25 10:31 FangwenYu 阅读(270) 评论(0) 推荐(0) 编辑
摘要: Abstract: 这个读书笔记系列是关于Tom的大作《Expert Oracle Database Architecture》 Chapter 1: Developing Successful Oracle Application 1. Bitmap index In the first session: Note: Don’t commit or rollback for now. Se... 阅读全文
posted @ 2009-10-25 10:25 FangwenYu 阅读(526) 评论(0) 推荐(0) 编辑
摘要: Abstract: IL directives: ld<xxx>: load xxx onto stack st<xxx>: pop off stack into xxx (1) ldarg.<length> - load argument onto the stack Format Assembly Format Description FE 09 ... 阅读全文
posted @ 2009-10-24 11:23 FangwenYu 阅读(320) 评论(0) 推荐(0) 编辑
摘要: Abstract: 通过查看IL来了解下声明在using语句中的对象是在try语句外面实例化还是在try里面实例化。 举例来说,下面的c# code 1: using(FileStream aFs = new FileStream(@"c:\test.txt", FileMode.Open)) 2: { 3: // Do noting... 4: }是对应下面的那种情况呢?(1) 1: File... 阅读全文
posted @ 2009-10-24 11:12 FangwenYu 阅读(230) 评论(0) 推荐(0) 编辑
摘要: Abstract: 通过一个简单的 web application, 学习以下内容:(1) ListView control(2) User control(3) Handle ViewState in User control(4) FindControl() usage, especially when there is a Master page. 本文主要讲述第一部分,即如何使用ListView控件。虽然GridView功能非常强大,但是有时候用GridView却不是非常方便。比如说要实现下面这个页面, 、数据结构是分层次,第一层次是student的基本信息,第二层是该student的 阅读全文
posted @ 2009-10-22 22:08 FangwenYu 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 最近工作中需要把XML文件按照一定的格式转成PDF文件,需要写一些XSL文件把对应的XML文件中的数据按照相应的格式成PDF文件,因此了解了下XSL的基本用法。 把XML转换成PDF用到的是FOP工具包,主要用法如下: 1: private const string COMMAND_LINE = "Tools\\jre\\bin\\java"; 2: private const string COMMAND_LINE_ARGUMENTS = "-cp Tools\\fop\\lib\\fop.jar;Tools\\fop\\lib\\xml-apis-1.3.02 阅读全文
posted @ 2009-10-19 21:06 FangwenYu 阅读(301) 评论(0) 推荐(0) 编辑