Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2005 : Is there an easy way to indent correctly in an ASPX file?

In Visual Studio 2005, is there a way to indent correctly the tags in the aspx file (not in .cs files but really in ASPX files which contain HTML/ASP code)?

like image 914
Cedric Aube Avatar asked Mar 10 '09 14:03

Cedric Aube


3 Answers

You can fix indenting using the shortcut Ctrl-K+D

like image 55
Dan Avatar answered Nov 05 '22 04:11

Dan


Those keystrokes translate to:

  • Ctrl-K, Ctrl-D : Edit/Advanced/Format Document
  • Ctrl-A, Ctrl-K, Ctrl-F : Edit/Select All, Edit/Advanced/Format Selection

For some reason, the latter seems to work better for me.

Note, these also work for other file types: C#, VB, XML etc...

like image 45
James Curran Avatar answered Nov 05 '22 04:11

James Curran


Ctrl-A (select all), Ctrl-K-F has worked for me.

like image 2
Sachin Avatar answered Nov 05 '22 04:11

Sachin