当我尝试从主服务器调用部分视图时,我收到堆栈溢出错误.
部分视图:
<%@ 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>
Run Code Online (Sandbox Code Playgroud)
"成员"控制器中的动作
[ChildActionOnly]
public ActionResult TestLogin()
{
return PartialView();
}
Run Code Online (Sandbox Code Playgroud)
然后我从母版页调用局部视图:
<!--Excerpt from wopr.master-->
<%= Html.Action("TestLogin", "Members")%>
Run Code Online (Sandbox Code Playgroud)
当我进入调试模式时,母版页返回此错误:
{无法计算表达式,因为当前线程处于堆栈溢出状态.}
我不明白这个错误是如何被触发的.任何帮助将非常感激!