Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 2SXC 中,我有一个内容类型和一个剃刀模板。在模板中,如果用户未经身份验证(未登录),我想显示一些内容,然后显示其他内容。我将如何编写这个 if 语句?
我想到了。
if (Request.IsAuthenticated) { you're logged in } else { you're not logged in }