Quantcast
Channel: RazorGenerator Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 525

Commented Issue: Error 1 Keyword, identifier, or string expected after verbatim specifier: @ [85]

$
0
0
Hi,
i am getting these 2 errors in the output window but everything works fine
Error 1 Keyword, identifier, or string expected after verbatim specifier: @
Error 2 A namespace cannot directly contain members such as fields or methods

here is my Helpers Page:

@using System.Security.Principal

@helper IfLoggedOn(Func<IPrincipal, HelperResult> content) {
var currentUser = HttpContext.Current.User;
if (currentUser == null) {
<i>
To use this content, you must

</i>
} else {
@content(currentUser)
}
}

thanks in advanced.


Comments: I received this same error when I had changed the Build Action on the "*.cshtml" file to "Compile". When I changed it to "None", the problem was resolved.

Viewing all articles
Browse latest Browse all 525

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>