包大人博客

迎奥运、讲文明、树新风 -- Welcome To Beijin 2008

About the author

Boris Yang
A troupe of little vagrants of the world, leave your footprints in my words.
E-mail me Send mail

Recent comments

Author

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

具有验证实现的客户端回调 (ClientScriptManager 类)

    在客户端回调中,客户端脚本函数会向 ASP.NET 网页发送请求,该网页随后会运行其正常生命周期的简化版本以处理该回调。若要确保回调事件源于预期的用户界面 (UI),可以对回调进行验证。回调验证涉及在网页呈现过程中注册要验证的事件,然后在回调过程中对该事件进行验证。      对回调事件验证可通过ClientScriptManager类的 RegisterForEventValidation 方法和 ValidateEvent 方法。    &nb... [More]

Currently rated 2.0 by 1 people

  • Currently 2/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: asp.net | c#
Posted by Admin on Monday, March 31, 2008 4:10 PM
Permalink | Comments (0) | Post RSSRSS comment feed

ICallbackEventHandler 接口实现回调事件

    为任何需要接收回调事件的自定义控件实现 ICallbackEventHandler 接口。     实现 ICallbackEventHandler 接口的控件的示例包括 GridView、DetailsView 和 TreeView 控件。当回调事件以实现了 ICallbackEventHandler 接口的控件为目标时,将把事件变量作为参数传递来调用 RaiseCallbackEvent 方法以处理该事件,并且 GetCallbackResult 方法返回回调的结果。另外还需要获取一个对客户端函数的引用;调... [More]

Currently rated 2.0 by 1 people

  • Currently 2/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: asp.net | c#
Posted by Admin on Monday, March 31, 2008 3:33 PM
Permalink | Comments (0) | Post RSSRSS comment feed

注册客户端脚本(ClientScriptManager 类)

    通过直接在网页的 HTML 标记中包含 script 脚本,可以声明方式向网页添加客户端脚本。然而,有些情况下需要动态添加客户端脚本。若要动态添加脚本,根据您想添加脚本的时间及方式,使用 RegisterClientScriptBlock 方法、RegisterClientScriptInclude 方法、RegisterStartupScript 方法或 RegisterOnSubmitStatement 方法。      这些方法都存在于ClientScriptManager 类中,ClientS... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: asp.net | c#
Posted by Admin on Monday, March 31, 2008 1:46 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Lock 关键字实现线程同步 [C#]

    lock 关键字可以用来确保代码块完成运行,而不会被其他线程中断。这是通过在代码块运行期间为给定对象获取互斥锁来实现的。lock 语句以关键字 lock 开头,它有一个作为参数的对象,在该参数的后面还有一个一次只能由一个线程执行的代码块。lock 关键字将语句块标记为临界区,方法是获取给定对象的互斥锁,执行语句,然后释放该锁。 例如:         public void Function()     &n... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: c# | FrameWork
Posted by Admin on Saturday, March 29, 2008 3:38 PM
Permalink | Comments (0) | Post RSSRSS comment feed

处理不同线程间的信号通信

    先来假设一个实际的场景:想象在系统中存在这样的一种海量计算,我们把它分为5个计算单元 – A、B1、B2、B3、C。没一个单元都需要大量的运算,并且 A单元必须先完成,因为B1、B2 和 B3 需要 A的结果。而C又需要B1、B2 和 B3 的结果。     这种场景下,最好优先考虑的应该是多线程计算。比如为 A、B1、B2 和 B3 各创建一个线程,C单元在主线程中运算,但考虑到各个单元之间有着依赖关系,我们可以清楚看到:C的计算必须等待 B1、B2 和 B3 三个单元运算都结束,而 B1、B2 ... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: c# | FrameWork
Posted by Admin on Saturday, March 29, 2008 2:42 PM
Permalink | Comments (0) | Post RSSRSS comment feed

快乐FLASH 电子琴

 弥补一下没有学过电子琴的遗憾吧!!! Come On 歌谱: 两只老虎 12 31 12 31 34 5- 34 5- 5654 31 5654 31 25 1- 25 1- 上学歌 1231 5- 6686 5- 668 563 6535 3123 1- 欢乐颂 3345 5432 1123322 3345 5432 1123211 2231 23431 2343... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: other
Posted by Admin on Wednesday, March 26, 2008 12:37 PM
Permalink | Comments (3) | Post RSSRSS comment feed

C# 泛型简介

 [参考MSDN] http://msdn2.microsoft.com/zh-cn/library/ms379564(vs.80).aspx(中文)                      http://msdn.microsoft.com/vcsharp/default.aspx?pull=/library/en-us/dnvs05/html/csharp_generics.... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,
Categories: c# | FrameWork
Posted by Admin on Monday, March 24, 2008 11:56 AM
Permalink | Comments (0) | Post RSSRSS comment feed

SQL SERVER 性能之 -- varchar AND nvarchar

Transact-SQL  varchar [ ( n | max ) ]       可变长度,非 Unicode 字符数据。n 的取值范围为 1 至 8,000。max (sqlserver 2005 增进)指示最大存储大小是 2^31-1 个字节。存储大小是输入数据的实际长度加 2 个字节。  1. 如果未在数据定义或变量声明语句中指定 n,则默认长度为 1。 DECLARE @myNextVariable AS varchar SET @myNextVariable... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: Sql Server
Posted by Admin on Wednesday, March 19, 2008 11:29 AM
Permalink | Comments (0) | Post RSSRSS comment feed

What is the difference between a callback and a postback?

What is the difference between a callback and a postback? A callback is a special postback, so a round-trip always occurs; however, unlike the classic postback, the script callback doesn't redraw the whole page. ViewState is not updated during a callback, it is for postback. How to m... [More]

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: .net | asp.net
Posted by Admin on Sunday, March 16, 2008 10:21 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Server.ScriptTimeout

The Session.Timeout and the Server.ScriptTimeout are TWO DIFFERENT THINGS. Assuming that a user visits your web site. He then enters a username inside a <textbox>. You then decide to put this username inside a Session variable. The default length of the Session variable is 20 Minutes... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: .net
Posted by Admin on Thursday, March 13, 2008 5:09 PM
Permalink | Comments (0) | Post RSSRSS comment feed

AJAX 快速应用 02(Michael Schwarz ajax.dll 篇)

    在前篇post AJAX 快速应用 01(Michael Schwarz ajax.dll 篇) 中我们重点介绍了如何在项目中使用 Michael Schwarz 的 Ajax 包装器。今天我们更深入一步的了解它的功能:  处理类型 -- 返回复杂类型     Ajax包装器不仅能处理ServerSideAdd函数 (参考AJAX 快速应用 01(Michael Schwarz ajax.dll 篇)) 所返回的整数。它目前还支持integers、strings、double、boolea... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,
Categories: ajax | asp.net
Posted by Admin on Saturday, March 08, 2008 6:03 PM
Permalink | Comments (0) | Post RSSRSS comment feed

迎接 WPF 你准备好了吗?

[参考] WPF官方网站 WPF简介      WPF的全称是Windows Presentation Foundation,是随.Net Framework 3.0一起推出的主打功之一,是微软新发布的Vista操作系统的三大核心开发库之一,其主要负责的是图形显示,所以叫Presentation(呈现)。加上Vista集成.Net Framework 3.0,可以预料改写 WinForm 的时代即将到来。作为新的图形引擎与早期的GDI+不同,WPF是基于DirectX的,支持GPU硬件加速,在不支持也可以使用软件绘制。高级别的线程进... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by Admin on Saturday, March 08, 2008 5:20 PM
Permalink | Comments (0) | Post RSSRSS comment feed