I suggest you ...

Visual Studio Content-Type support for <text> in Razor

Currently the <text> placeholder element assumes HTML content in Visual Studio formatting.
The addition of attributes (namely, "type" for Content-Type) to control Visual Studio's parser/formatter in these blocks would be quite useful for templating non-HTML content in template methods.

For example:

@{ object template = @<text type="text/css">
.foo { background-image: url("foo.png"); }
.bar { background-image: url("bar.png"); }
</text>; }

The type attribute in this case would enforce formatting of the template contents as CSS.

6 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    DanDan shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • DanDan commented  ·   ·  Flag as inappropriate

        Addendum: This is strictly intended as a hook for the Visual Studio parser, with no impact on the processing of Razor templates. If, however, someone sees value in supplementing the Razor parser with support for this meta-data, such that it could impact the page processing, then I think that's darn cool :)

      Feedback and Knowledge Base