1
我想让我的登录部分从我的数据库中读取用户的名字和姓氏。因此,我试图从我的布局调用一个动作,而不是视图部分。@ Html.Action上的StackOverflow异常()
@If Request.IsAuthenticated Then
@<text><div class="authBox">Welcome <strong>@User.Identity.Name</strong>!
</div></text>
Else
我得到一个堆栈溢出异常在此行中我的布局:
@Html.Action("RenderLogOnPartial", "Employee")
这里是我打电话的动作:
'
' GET: /Employee/RenderLogOnPartial
Public Function RenderLogOnPartial() As ViewResult
Return View("_LogOnWithValidationPartial")
End Function
我能做些什么,以获得名字和姓氏进入我的观点部分?谢谢。
我不知道它是这样一个渲染的局部视图选项。谢谢。 – user1477388