locked
Disable Highligthing in .cshtml RRS feed

Answers

  • Hi 65days,

    Thanks for your post.

    This highlighting is the built in support for Razor syntax highlighting. If you do not like it, you can open your .cshtml files in Visual Studio using the HTML editor:

    then choose “HTML Editor”…

    If you have any concerns, please feel free to let me know.

    Best Regards,


    Andrew Wu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Andrew.Wu Tuesday, March 29, 2011 10:12 AM
    Friday, March 25, 2011 3:50 AM

All replies

  • Hi 65days,

    Thanks for your post.

    This highlighting is the built in support for Razor syntax highlighting. If you do not like it, you can open your .cshtml files in Visual Studio using the HTML editor:

    then choose “HTML Editor”…

    If you have any concerns, please feel free to let me know.

    Best Regards,


    Andrew Wu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Andrew.Wu Tuesday, March 29, 2011 10:12 AM
    Friday, March 25, 2011 3:50 AM
  • I realize I'm a little late on this response but in case you or someone else is wondering just go to Tools > Options > Environment > Fonts and Colors > select "HTML Server-Side Script" in the Display items list > Change the Item background color to white (or whatever suits your liking).

    Hope this helps :D
    • Edited by Sage Mage Wednesday, October 24, 2012 5:48 PM
    • Proposed as answer by Sage Mage Wednesday, October 24, 2012 5:48 PM
    Wednesday, October 24, 2012 5:47 PM
  • In my case was "HTML Razon Code Background"
    Monday, July 15, 2019 6:27 PM
  • I realize I'm a little late on this response but in case you or someone else is wondering just go to Tools > Options > Environment > Fonts and Colors > select "HTML Server-Side Script" in the Display items list > Change the Item background color to white (or whatever suits your liking).

    Hope this helps :D
    Thank you for actually answering the question! Maybe I have a different environment / project (likely after 7 years), but my setting was "HTML Razor Code Background" instead.
    Wednesday, August 21, 2019 8:53 PM
  • Hi 65days,

    Thanks for your post.

    This highlighting is the built in support for Razor syntax highlighting. If you do not like it, you can open your .cshtml files in Visual Studio using the HTML editor:

    then choose “HTML Editor”…

    If you have any concerns, please feel free to let me know.

    Best Regards,


    Andrew Wu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    I don't know why this was marked as the answer, it literally doesn't answer the question at all.
    Wednesday, August 21, 2019 8:54 PM