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?
Asked
Active
Viewed 153 times
1 Answers
0
I figured it out.
if (Request.IsAuthenticated) {
you're logged in
}
else {
you're not logged in
}

VDWWD
- 35,079
- 22
- 62
- 79

Aaron - Wolf X Machina
- 443
- 1
- 3
- 13
-
I'll add this to the snippets :) – iJungleBoy Sep 03 '16 at 08:36