MVC5 Microsoft.CSharp.RuntimeBinder.RuntimeBinderException

前端 未结 7 1931
春和景丽
春和景丽 2021-02-01 21:52

Ive been working on converting a MVC4 project over to MVC5. The first day I ran into an \'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException\' but was able to resolve it by s

7条回答
  •  梦毁少年i
    2021-02-01 22:37

    yeah, I replaced the "else" code with the following and its working but still trying to see why it didn't work when using Model.Action ?

    //string action = Model.Action;
    //string returnUrl = Model.ReturnUrl;
    //using (Html.BeginForm(action, "Account", new { ReturnUrl = returnUrl }))
    using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = ViewBag.ReturnUrl }))
    

提交回复
热议问题