Review: ASP.NET 2.0 MVP Hacks and Tips
page 2 of 5
by Keyvan Nayyeri
Average Rating: 
Views (Total / Last 10 Days): 25029/ 56


Below I give a short description about all 17 chapters of this book.

Hacks Revisited

The first chapter tries to give some famous common ASP.NET 1.1 hacks that are now a part of ASP.NET 2.0 because Microsoft could get their importance from community.  Some hacks such as ASP.NET Wizard Control, Master Pages and URL Rewriting are briefly described with their history.

Getting Started

The second chapter talks about one of the common topics for every developer from a professional point of view.  The main goal of this chapter is to give good information and tips about building projects, organizing them, database projects, working with source control, setting up a custom base page class, using Master Pages, dealing with ASP.NET 2.0 themes and skins, how to deal with Web Configurations in a team and working with Visual Studio 2005 Templates.

The Power of Providers

This chapter starts with giving some information about provider model, ASP.NET 2.0 built-in providers and how to extend them.  Then it shows you how to write your own Membership and Role providers, as well as building a Role Provider Proxy.  This chapter ends by talking about building a custom provider.

The Smarter Web Client

This chapter discusses AJAX and Atlas.

After starting with Client Callback feature in ASP.NET 2.0 in some detail and how it can enable AJAX functionality for developers by giving an example of its implementation in a custom control, the chapter talks about Atlas, how it works and some common Atlas controls such as AutoComplete, UpdatePanel and TimerControl shortly.  Finally, a list of community projects for AJAX has been presented.

Debugging What You Created

The authors begin this chapter by talking about Visualizers and their role in .NET debugging and how to write your own Visualizer and deploy it.  To do this they provide a real world example of creating an Image Visualizer.

The last pages of this chapter are dedicated to talking about some coding tips for better debugging, such as setting object member visibility, Type Proxy and add debugging logic to business objects.

Control Hacks

This chapter discusses some hacks around controls.  To do this the authors have chosen ASP.NET XML server control to extend it to enable RSS functionality for it and show some tips to readers.

During this process some topics such as caching, custom type converters, custom actions and designers, design time and design type editor have been covered.

GridView Hacks

Chapter 7 is all about GridView control to show you how to enable extra functionality for your GridView controls by using several server and client side tips.

Some hacks that are included in this chapter are dynamically expanded rows on client side, creating a pager template for GridView control, deleting selected rows in GridView, updating all GridView rows using batch query, adding a selected row, using up and down arrows in column headers to sort rows, use client side scripts for this control for better functionality and IPostBackEventHandler to extend GridView functionality.

This chapter contains several useful hacks about GridView control.

Extreme Data Binding

The main goal of this chapter is ASP.NET 2.0 DataSource controls and covers the following topics: inheriting your own DataSource control, working with DataSource configuration wizard to add your custom DataSource, adding a control designer for your DataSource control, extending DataSource controls and working with and extending custom parameters and fields.

As with chapter 7, this chapter has very good hacks for developers.

View State

This chapter starts with giving background about ViewState and its role in the page's life cycle and how to use LosFormatter to serialize data to save in ViewState.  This chapter follows with talking about a technique to split ViewState in ASP.NET 1.1 and compressing ViewState for a smaller size.  The chapter ends by discussing alternative storage options for ViewState and moving ViewState to the bottom of the page for better SEO friendly output.

Cache Hacks

Caching is important enough to have its own chapter in the book.  Chapter 10 talks about static caching, reading and modifying the cache and refreshing the cache.  It follows with writing a sample ASP.NET cache viewer to show how a developer can view the cache via code.  This sample can be considered the best part of this chapter.

Moving to ASP.NET 2.0 from 1.x

To do a migration from ASP.NET 1.x to 2.0 there is a built-in wizard in Visual Studio 2005, but it cannot handle all scenarios.  Professional developers need to do more for their applications.

This chapter starts by creating a demo ASP.NET 1.x web application which contains some user controls, classes and pages. The authors then give a bit of information about the migration process and implement a migration for this demo application. They finish this chapter by discussing some common topics around conversion and the issues that may be raised during it.

Deployment Hacks

Deployment is another important topic in each software system and ASP.NET web applications are no exceptions.  ASP.NET 2.0 comes with several new deployment options and developers should understand them to be able to choose the best one for their needs.

This chapter gives some information about Copy Web Site wizard, Publish Web Site wizard and Windows installer.  Later it discusses Web Deployment Project Add-in and some compilation and assembly tips.  It ends with a short description of MSBuild and what a developer can do with it.

Leveraging Visual Studio

Visual Studio is the most common IDE for writing ASP.NET applications and there are many hacks and tips available for it.

Code Snippets, their description and applications and a way to make snippets are the first topics covered in chapter 13.  At the end of the chapter Visual Studio Templates are introduced and discussed.

Security Hacks

This important topic is the main goal of this chapter.  Some techniques to avoid SQL Injection and Parameterizing IN Expression are the database related security hacks at the start of this chapter.

The chapter follows with some hacks for protecting against Canonicalization Attacks, ASP.NET 2.0 File Upload server control, Dynamic Impersonation and Validating a strong password in Login control.

Building Your Own Hacks

The authors want to help other developers build their own hacks and encourage them to publish them on .NET communities.

After giving a definition of a hack and some constraints to help consider a hack, the authors talk about several techniques to build your own hacks and refer you to some famous .NET communities to publish them.

Master Pages

No!  This chapter does not talk about Master Pages in details.  It just introduces them with some fundamentals about the necessity for their existence, such as the functionality in older platforms and how to deal with them via code.  It then talks about nested Master Pages and some tips to load them in Visual Studio IDE.  Sharing a Master Page across multiple IIS application is another topic of this chapter.  The last topic is about dynamically adding a Master Page to a content page.

Handlers and Modules

Scott Hanselman is the author of this chapter.  He does not show how you can write an HTTPModule or HTTPHandler in ASP.NET.  Instead, he shows you some examples of real world scenarios that can be implemented via them.

An IP Blacklist HTTPModule, Rewriting and Redirecting URLs with an HTTPModule, Boilerplate HTTPHandler, Discouraging Leeching using an Image-Specific HTTPHandler, Compositing Images with an HTTPHandler and Generating Sparklines with an HTTPHandler are the main topics of the last chapter.

This great book ends with introducing ELMAH (Error Logging Modules and Handlers) which is a good example of working with a combination of HTTPModules and HTTPHandlers together.

View Entire Article

User Comments

Title: .Net Programmers   
Name: Walter Pope
Date: 2013-01-09 3:18:39 AM
Another thing to note is that the .net assemblies in these NuGet packages are all signed whereas the equivalent assemblies that come with MapGuide Open Source 2.4 are not.
Title: .Net programmer   
Name: Solomon Eaton
Date: 2012-12-26 6:13:22 AM
The primary purpose of this book is to collect a great collection of hacks and tips that are worth knowing for every developer.
Title: .Net programmer   
Name: Oren Nash
Date: 2012-12-25 5:14:15 AM
I highly recommend it for everyone who wants to have more information about ASP.NET.
Title: .NET Developer   
Name: NathanielPotter
Date: 2012-10-23 6:45:41 AM
If your legacy applications are unmanageable, we have an excellent team of software professionals with great expertise in legacy programming to convert them into .NET based applications.
Title: PrestaShop Customization   
Name: ElizabethMelton
Date: 2012-10-12 1:19:47 AM
Superb reviews well done!nice job!

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-05-23 3:09:00 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search