ASP.NET MVC stack overflow exception when calling a partial view from master page

Posted by quakkels on Stack Overflow See other posts from Stack Overflow or by quakkels
Published on 2010-05-11T22:16:41Z Indexed on 2010/05/11 22:44 UTC
Read the original article Hit count: 553

Filed under:
|

Hey there everyone,

I'm getting a stack overflow error when I try to call a partial view from the master.

The Partial View:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>

<form action="/members/TestLoginProcess/" method="post">
U: <input type="text" name="mUsername" /><br />
P: <input type="password" name="mHash" /><br />
<button type="submit">Log In</button>
</form>

The Action in the "Members" controller

[ChildActionOnly]
    public ActionResult TestLogin()
    {
        return PartialView();
    }

Then I call the partial view from the master page:

<!--Excerpt from wopr.master--> 
<%= Html.Action("TestLogin", "Members")%>

When I go into debug mode the master page returns this error:

{Cannot evaluate expression because the current thread is in a stack overflow state.}

I don't understand how this error is getting triggered. any help would be much appreciated!

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about stack-overflow