1

if we have a c# code between view page and wants to print string with @ or { between string .how it is possible in view page.

EXample-

@if(rules)
{

/////////////print something here with @ and {//////

}

3 Answers 3

6

@@ is the escape character for @ in Razor views

3

Wrap it in <text> tags.

<text>[email protected]</text>
2

@@ is the way doing it in MVC Razor

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.