I am trying to get my login partial to read the user's first and last name from my database. Therefore, I am trying to call an action from my layout instead of the view partial.
@If Request.IsAuthenticated Then
@<text><div class="authBox">Welcome <strong>@User.Identity.Name</strong>!
</div></text>
Else
I am getting a stack overflow exception on this line in my layout:
@Html.Action("RenderLogOnPartial", "Employee")
Here is the action I am calling:
'
' GET: /Employee/RenderLogOnPartial
Public Function RenderLogOnPartial() As ViewResult
Return View("_LogOnWithValidationPartial")
End Function
What can I do to get the first and last name into my view partial? Thanks.