I use the following combination to auto format indentations of my code in VS2012.
Unformatted code bock in web.config:
Ctrl + A to select all the code in a file to be formatted in VS2012. Or you can select just a block of the code manually.
Ctrl + K, then Ctrl + F will format the code with proper indentations.
Formatted code block
