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