2) When using a DataGrid that is non-editable and using column templates, don't setup any EditItemTemplate tag on any of the columns. This adds unneeded overhead to the grid. Also when using Bound Columns with your DataGrid (non-templated columns) and you are not going to be editing through the grid itself, make all of your columns ReadOnly. This will alter the HTML that is generated to make it much "thinner" by no adding label controls for each cell of the table.
3) Append strings with & or &= instead of + or +=. The difference is when you try to append something that isn't a string. & will work + won't.
4) Use AndAlso and OrElse instead of just AND or OR. When performing an If statement in VB.NET, VB actually evaluates both expressions to see if the who expression is true. Even when the first expression is false. It continues to look at the second argument even though it doesn't have to. This very helpful when using Functions as expressions in the statement Code:Instead of doing thisIf(Function1() And Function2()) ThenDo thisIf(Function1() AndAlso Function2()) ThenThe first code will evaluate the result of Function2(), even if Function1() returned false. The second will only evaluate Function2() if Function1() returned true.
5) Don't use Labels on a web form unless it is going to be referenced in code (changing the text or making it invisible). If the it will contain static (unchanging) text, just type it directly into the page. There's no sense in adding unnecessary overhead to your applications.
6) It is 5-6 times faster to compare the Length of a string, than it is checking for "" or NOT ""Example:Code:Instead of doing thisIf(txtName.Text = "") ThenDo thisIf(Len(txtName.Text) = 0) ThenOrIf txtName.Text.Length = 0 Then
7) Avoid using Response.Write in ASP.NET. The ASP.NET rendering process takes place after the Response.Write would, you have no control over where the data is written to on the page (It appears at the top of the page, even above you html tag).
8)Use the Parse functions instead of CInt, CDbl, CSng, CBool, etc... The
9) Avoid using empty Try...Catch blocks. Not placing code in the Catch area of the Try...Catch block is essentially the same as saying "On Error Resume Next", which can be a bad thing, especially for debugging purposes.
10) Avoid using RegisterStartupScript. This adds unnecesarry processing on the web server for handling things that should have been done in the client (like form validation). Instead use either client-side javascript or .NET's Validator controls (Compare, Custom, Required Field, Regular Expression)