AI OnAI Off
ActionLink:
@Html.ActionLink("Delete", "Delete", "AccountsPlugin", new { id = item.UserId })
Ok, i found the solution:
@Html.ActionLink("Delete", "Delete", "AccountsPlugin", new { id = item.AnvaId }, null)
and of course you must define it in your route. Not in routeconfig but in module.config:
<route url="{moduleArea}/{controller}/{action}/{id}">
<defaults>
<add key="moduleArea" value="eFocus.Poliservice.Framework.Websites.Poliservice" />
<add key="controller" value="" />
<add key="action" value="Index" />
<add key="id" value="" />
</defaults>
</route>
Hi,
I am writing a custom episerver plugin with MVC and Razor.
I have a Controller, decorated with a GuiPlugin attribute. I have a Index, Delete and Create action. The index action is rendered correctly when I browse to it in EPiServer. However, when I want for example call the Delete action I want to add a id as routevalue. Somehow the id is null when I use it in the parameters of my Delete action. Apparently the modelbinding is not working correctly.
Should I build a new modelbinder for this or is my configuration faulty? I am hoping for the last option.
------------------
Model.config:
My Controller: