The difference between Html.Action and Html.RenderAction

后端 未结 3 710
独厮守ぢ
独厮守ぢ 2020-12-09 01:49

I\'ve been trying to figure out the difference between RenderAction and Action. I don\'t know if I\'m so concerned about the differences at this point, as to why I can\'t ge

3条回答
  •  不思量自难忘°
    2020-12-09 02:31

    Try:

    @{Html.RenderAction("Breadcrumb", "Navigation", new {SeoUrl = Model.CarlineBucket.SEOURLName});}
    

    @Html.RenderAction() generates a write call to output something on the page and in your case you are not doing so because RenderAction renders the result directly to the Response.

    Instead of

    @Html.RenderAction()
    

    Use

    @{Html.RenderAction();}
    

提交回复
热议问题