Ajax.ActionLink alternative with mvc core

前端 未结 4 1909
时光取名叫无心
时光取名叫无心 2021-01-13 06:03

In MVC5 there is @Ajax.ActionLink that is useful to update just a partial view instead of reloading the whole View. Apparently in MVC6 is not supported anymore.

4条回答
  •  余生分开走
    2021-01-13 06:29

    Use tag helpers instead and make sure to include _ViewImport in your views folder.

    Note: Make sure to use document.getElementsByName if there are several links pointing to different pages that will update your DIV.

    Example - Razor Page

    
    Session
    Session
    
    
    
    Some Default Content

提交回复
热议问题