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

后端 未结 3 1213
悲&欢浪女
悲&欢浪女 2021-01-19 15:24

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

The Partial View:

<%@ Control Language=\"C         


        
3条回答
  •  半阙折子戏
    2021-01-19 15:54

    I got the exact same thing because I was loading a user control that was essentially a menu bar, but full of Html.Action(), rather than Html.ActionLink(), so it was continuously calling the Action and because it went back to a page that inherited the same masterpage, was calling it again...and again...and again.

    So yeah my problem was I was using the wrong keyword.

提交回复
热议问题