Write code that is easy to understand by using meaningful variable and function names, proper indentation, and comments where necessary. The next developer (which could be future you!) should be able to understand your code without much effort.
f the error isn’t serious, and it is in the committable state, we can still commit the transaction. But if something went wrong and is in an uncommittable state, then we can roll back the transaction. This can be done by simply running and analyzing the XACT_STATE function that reports transaction state.
Do not store large objects in session. Storing large objects in session may consume lot of server memory depending on the number of users.
Do not store large objects in View State. It will increase page load time.
ASP.NET Code should not contain any business logic. It should call a business logic component.
Use Style sheet for providing consistent look and feel to an application.
Handle exceptions gracefully use global exception handling [Page_Error Or Application_Error].
Don’t use absolute paths – until and unless you have strong reason to do so. Prefer to use Server.MapPath(“~/…..”);
Avoid Copy – Pasting same code everywhere. Better to put them in Base Class or create new utility class.
Editing
Collapses existing regions to provide a high-level view of the types and members (CTRL + M + O)
Removes all outlining information from the whole document. (CTRL + M + P)
Toggles the currently selected collapsed region. (CTRL + M + M)
Inserts // at the beginning of the current line or every line of the current selection. (CTRL + K + C)
Removes the // at the beginning of the current line or every line of the current selection. (CTRL + K + U)
Formats the current document according to the indentation and code formatting settings specified on the Formatting pane under Tools | Options | Text Editor | C#. (CTRL + K + D)
Intellisense
Displays the available options on the smart tag menu. (CTRL + K + I)
Causes a visible completion list to become transparent. (CTRL)
Debugging
Conditional Debug
Launch in Debug Mode (F5)
Launch without Debug Mode (CTRL + F5)
Sets or removes a breakpoint at the current line (F9)
To Remove all breakpoints (CTRL + SHIFT + F9)
Navigation
Displays a list of all references for the symbol selected (CTRL + K + R)
Moves the cursor location to the matching brace in the source file (CTRL + ])
Navigates to the declaration for the selected symbol in code (F12)
Moves to the previously browsed line of code (CTRL + -)
Displays the selected item in Code view of the editor (F7)
Switches to Design view for the current document. Available only in Source view (SHIFT + F7)
Switches to Source view for the current document. Available only in Design view (SHIFT + F7)
Displays the Quick tab of the Find and Replace dialog box (CTRL + F)
Displays the Go To Line dialog box (CTRL + G)
Do not store large objects in session. Storing large objects in session may consume lot of server memory depending on the number of u