21. Thou shalt catch all exceptions before they are thrown to the end-user. After all there is a nice HttpApplication.Error event that is just for that purpose. And give user a nice error page, not the ASP.NET generic one

Originally Posted by
big_al
5. Thou shalt wrap any disposable items in a using statement
i.e. using(SqlConnection cnn = new SqlConnection())
Or dispose them in finally section of you exception hadling statement. (Especialy for the VB.NET people) And instantiate them as late as possible and dispose them as early when you don't need them anymore. (mainly for DB connections, images, streams)

Originally Posted by
big_al
7. Thou shalt not deploy a live site when compiled in 'Debug' mode.
Also don't forget to turn off in web.config:
Code:
<compilation debug="false" />
Off Topic:
Thou shalt not overgeneralize: "12. Thou shalt use Server.Transfer, not Response.Redirect when moving to another url programatically." is IMHO not good, they can be both used and have their distincitve usages.
Bookmarks