In 2SXC, I have a content type and a razor template. In the template, I want to show some content if the user is unauthenticated (not logged in) and then show something else if they are. How would I write this if statement?
I figured it out.
if (Request.IsAuthenticated) {
you're logged in
}
else {
you're not logged in
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.