Load partial view in main view on click

后端 未结 1 847
囚心锁ツ
囚心锁ツ 2021-01-15 13:14

I\'m trying to get a partial view to load on my current view when the user clicks the link but it keeps loading the partial view rather then on the same view.

Not su

1条回答
  •  广开言路
    2021-01-15 13:17

    If its displaying only the partial view, its because you have not included the required files for Ajax.ActionLink to work (and its just performing a normal redirect). Ensure you have included jquery.{version}.js and jquery.unobtrusive-ajax.js

    The reason parameter mType is null is because you are not passing a value. It should be

    @Ajax.ActionLink("SQL Cluster Online ", "MonitorDetail", "NOCCon", new { mtype = MonitorType.AHSSQLCluster }, new AjaxOptions() ....)
    

    0 讨论(0)
提交回复
热议问题