Tip#102: Did you know… How to specify tag specific formatting

Let’s see this with an example.  I have the following html code on my page. Now if I format the document by selecting Edit –> Format document (or Ctrl K, Ctrl D) The document becomes I want the content inside td should remain on the same line after formatting the document. Following steps would show…

2

Tip #59: Did you know…How you can automatically format unformatted HTML on paste in VS?

Do you copy/ paste a lot of unformatted HTML content in to your web forms? Do you always format HTML after pasting such content? There is an easy way to automatically format HTML on paste in VS. Here is how you do it. In Tools->Options dialog, go to Text Editor->HTML->Miscellaneous page. Check ‘Format HTML on…

7

Tip #58: Did you know…How you can import/ export HTML Per Tag options in VS?

If you make a lot of customization to per tag options and you want import/ export these settings you could easily do so with Tools->Import/Export Settings dialog. To export your custom settings to a vssettings file, launch Import and Export Settings Wizard from the menu by choosing Tools->Import/Export Settings. Click ‘Next’ In the next page…

4

Tip #54: Did you know…How you can turn off intellisense for HTML/ CSS editors

If you would like turn off intellisense in HTML editors (aspx, html files) and CSS editor (css files), you could do so by going to Tools->Options dialog. For HTML editor, go to Tools->Options->HTML->General. In the right pane, under Statement Completion, uncheck "Auto list members" For CSS Editor, go to Tools->Options->Text Editor->CSS->General. In the right pane,…

3

Tip #37: Did you know…How to organize usings?

Overtime C# source code files may have unnecessary & unorganized using directives. Visual Studio IDE organize using options can help you to unclutter the source code. To organize the C# code right click anywhere inside the code editor, select Organize usings. Select Remove Unused Usings to remove any using directives that are not used in…

3

Tip #28 Did you know… That “Go to definition” is supported for CSS Class?

If you have a style defined as Class = ”fooRed”  as shown below and want to quickly know what does fooRed style contain? <div class ="fooRed"> In RED </div>  Just place your cursor on fooRed and hit the F12 button. This will highlight the CSS class for you even if the class lives in the…

9

Tip #24: Did you know…You could display CSS/HTML errors as warnings or as errors?

VS 2008 has this cool feature of downgrading any CSS/HTML errors to warnings. This is helpful when you want to separate out validation errors and are looking for what is actually stopping your build. In VS 2008 the default behavior is to display any HTML/CSS errors as warnings as shown in the picture below. Note…

1

Tip #23: Did you know…How to launch Formatting options dialog for editor with 2 clicks?

Normally we use Tools->Options->Text Editor->HTML->Format to launch the Formatting Options dialog shown below: You can also launch the above dialog from the editor surface with just 2 clicks. On the editor surface, right-click and choose ‘Formatting and Validation’ from the context menu. Voila! You get the Formatting Options dialog shown above. Ranjini SDET | Visual…

1