c# - How do I use an Ajax.ActionLink without updating the URL -
i got following ajax actionlink in cshtml page:
@ajax.actionlink("sort date", "specific", "events", new ajaxoptions { updatetargetid="eventlistcontainer", insertionmode=insertionmode.insertafter, httpmethod="get" })
and got these 2 methods in controller:
public actionresult overview(string user) { // return partialview here }
and
public partialviewresult specific() { // return partialview here }
with following route:
routes.maproute( name: "eventsroute", url: "events/{user}", defaults: new { controller = "events", action = "overview" } );
now, every time call ajax method, overview
gets called, specific
passed inside, instead of specific method. how can make sure specific() gets called, without updating url?
something this. play around ordering.
routes.maproute( name: "eventsspecificroute", url: "events/specific", defaults: new { controller = "events", action = "specific" } );
Comments
Post a Comment