Here are some various notes for the ASP.NET class that I am teaching this week (more to come):
A Visual Studio Add-In That Converts C# Code To Visual Basic
VB.NET Naming Conventions
CSS Friendly ASP.NET 2.0 Control Adapters (Beta 2.0)
Enterprise Library
(for .NET 2.0)
Exception Handling Block
Logging Application Block
(for .NET 1.1)
Upcoming Local Events
Next Code Camp in Waltham
Next MSDN Event in Syracuse
ASP.NET Performance Tips
Keep Sites Running Smoothly By Avoiding These 10 Common ASP.NET Pitfalls
10 Tips for Writing High-Performance Web Applications
A "Complete" Data Grid Example for ASP.NET 1.1
Zip Download
AJAX/Atlas
Scriptaculous
Fiddler Tool
Data Access Layer
ActionPack
ActionPack Video Intro
Simple Printing from the browser
(Method 1) Add some Javascript to an HTML button
(Method 2) Add some Javascript to a Button from the server side:
Button2.Attributes.Add("onclick", "window.print(); return false;")
Note that Method 2 can also be used for other things like a Confirm dialog for a postback
Button1.Attributes.Add("onclick", "return confirm('Are you sure?')")
Dynamically Enabling Page Caching, Based on DEBUG Mode
Because of the headaches that page caching can cause when you are in development mode, you may want to dynamically enable or disable page caching based on something like a compiler constant:
#If DEBUG Then
lblStatus.Text = "*NOT* using output caching (debug mode)"
#Else
Response.Cache.SetExpires(Date.Now.AddMinutes(20))
lblStatus.Text = "using output caching (Production mode)"
#End If