I keep seeing *@ everywhere in a Visual Studio MVC Web app within all the CSHTML files, within the script tags.
Search engines refuse to let me search those characters which is ridiculous and I have struggled for hours trying to figure this out.
The lines that have the *@ are the same colors as the comments, does that mean it's commented out?
in MVC @(at) using for binding with Model . For example :
@model yourModel;
@foreach(var item in Model){
@item.yourItemFromYourModel;
}
So double at like this @* *@ using for comments. For ex:
@*YourComment*@
Hope it helps ;) Here: https://stackoverflow.com/a/3383662/4640991
Jup you are correct using the @* *@
block you can set some content like HTML
or Server code
in your razor code as a comment.
Documentation: ASP.NET MVC 3: Server-Side Comments with Razor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With