Problem in adding Comments in cshtml files RRS feed

  • Question

  • If I add comments in cshtml files, it is taken as a new line when it is called in Ajax function.
    Friday, February 4, 2011 4:09 AM

All replies

  • You should be able to use the regular HTML comments (e.g. <!-- enter comments here -->)

    Becaues cshtml files are essentially treated like regular html files, it shouldn't have different commenting structures. Perhaps you could escape these comments when dealing with them in AJAX? Just a thought!

    Monday, February 7, 2011 4:56 PM
  • The comment mark in cshtml is,

     @* ........................... *@




    • Proposed as answer by yanyee Wednesday, May 29, 2013 7:56 AM
    Monday, July 18, 2011 11:26 AM
  • Hi!


    <!-- enter comments here --> 

    for render comments in output html file

    or use 

    @* enter comments here *@
    for hide comments in output html file.

    • Proposed as answer by MrSena Tuesday, September 20, 2011 12:50 PM
    Tuesday, September 20, 2011 12:49 PM