How to change server script background in Visual Studio 2008

I am developing Asp.net MVC applications, and since there are quite a few scripts in place in my aspx / ascx files, they can become really messy, find their way.

What I would like to do (to simplify me) sets some background color for server-side scripts.

Right now, only <% and %> have a yellow background, but I would like the content between the two to have a specific background color. Something like the Tengible T4 editor makes executable code in T4 files with a template.

How to do it, if at all possible?

Encryption
This does not apply to Asp.net MVC in particular, but to Visual Studio in general. However, it will be useful for Asp.net MVC developers. :)

+4
source share
4 answers

Without additives, this is not possible . There is no such setting in Visual Studio 2008 (or 2010, for that matter).

+1
source

You did not specifically say whether you want to do this with third-party tools. Perhaps this can be done using the DevExpress CodeRush tool! . I did not study their user support for macros.

0
source

I do not know if this is possible, but I recommend opening the "Tools / Options" dialog and viewing in the environment / Fonts and colors there. There is an "HTML Server Side Script" element in the list, but I think these are just <% and%> tags.

Perhaps you should consider writing a VS extension for this purpose. (For VS 2010, this is even easier to do.)

-one
source

Go to the tool → Options → Text editor → HTML → Format → tag Specific option → ASP.NET controls. This section contains all the tags, you can change the tag that you like.

-one
source

All Articles