Menu:

Recent Entries

Categories

Archives

Links

Blogs
- Dflying's Night
- David's Untitled Life
- Dflying's Blog in Chinese

This blog is hosted by DreamHost!

Syndicate

RSS 0.90
RSS 1.0
RSS 2.0
Atom 0.3

Prefer Overrides to Event Handlers in ASP.NET Page

Dflying | 29 March, 2006 06:43

First let’s take a look at two small pieces of code in an ASP.NET code file:

This one is the well known Page_Load() method. Actually it is an event handler which got executed when a Load Event defined in System.Web.UI.Page is fired.

// use event handler
protected void Page_Load(object sender, EventArgs e)
{
    // logic here
}

This one, the OnLoad() method just overrides its base method.

protected override void OnLoad(EventArgs e)
{
    // logic here
    base.OnLoad(e);
}

Though the two methods above can do the same things to initialize your ASP.NET page, I prefer the override way.

 (More)

Posted in ASP.net . Comment: (0). Trackbacks:(198). Permalink

Web Standard and ASP.NET – Part1 XHTML Quick Start

Dflying | 26 March, 2006 18:47

Web Standard is more and more important in current web based application development. In these series of posts I am going to sharing some of my ideas about how to build Web Standard applications using ASP.NET 2.0.

This post is the first in these series. It introduces some basic XHTML concepts and a quick guide for HTML developers to get familiar with XHTML.

 (More)

Posted in ASP.net . Comment: (0). Trackbacks:(187). Permalink

New Features in ASP.NET 2.0 Page Model

Dflying | 13 March, 2006 01:40

The Attributes of the @Page directive

The @Page directive is the point of control for the developer with some new attributes that have been added to this directive:

  1. Async: If this is set to true, the page class that is generated derives from IHttpAsyncHandler. It adds some built in asynchronous capabilities to the page.
  2. CompileWeb: This attribute specifies the name of the referenced code-beside file to use for the page.
  3. EnablePersonalization: Indicates whether profile information should be used to build the page.
  4. MasterPageFile: This attribute specifies the path of the master to use for building the current page.
  5. PersonalizationProvider: this attribute specifies a valid provider defined in the application’s configuration file.
  6. Theme: specifies the name of the theme to be used.

If Boolean Async directive is used ASP.NET serves up the page in an asynchronous way. The page executes the custom code asynchronously while runtime progresses on the page life cycle. The request threads are synchronized and the output is generated in the browser by setting a single unwind point on the page between PreRender and PreRenderComplete events.

 (More)

Posted in ASP.net . Comment: (0). Trackbacks:(90). Permalink

Video Series: Visual Web Developer for Beginners

Dflying | 28 February, 2006 17:24

Recently Microsoft published a video series: Visual Web Developer for Beginners, which shows the basic ideas/developing work flows of ASP.NET and basic functionalities of Microsoft Visual Web Developer. All the samples are small and interesting with both C# and VB versions. Also source code (C# and VB) is available for downloading. Please check out here: http://msdn.microsoft.com/vstudio/express/vwd/learning/default.aspx

Please note these are only for beginners. If you’ve experiences in previous version of ASP.NET and Visual Studio, just go to MSDN directly for more detailed and advanced information.

 (More)

Posted in ASP.net . Comment: (1). Trackbacks:(0). Permalink

Microsoft .NET shared hosting solutions

Dflying | 28 February, 2006 01:58

It is true that VWDHosting.net now provides you a 30-day account FREELY which lets you:

 (More)

Posted in ASP.net . Comment: (2). Trackbacks:(98). Permalink