asp.net mvc - ASP MVC3 ActionLink not rendering variables -
i trying use asp mvc3 action link navigate view (same controller). view attached model uses compound key primary key. below action link it's written on view @html.actionlink("edit agent", "agentedit", "banklistmastercontroller", new { @agentid = int.parse(item.agentid), @id = item.id}) however when rendered renders following http://localhost:2574/banklistmaster/agentedit?length=24 which throws error: the parameters dictionary contains null entry parameter 'agentid' of non-nullable type 'system.int32' method 'system.web.mvc.viewresult agentedit(int32, int32)' in 'monet.controllers.banklistmastercontroller'. optional parameter must reference type, nullable type, or declared optional parameter. parameter name: parameters here controller method measure: public viewresult agentedit(int agentid, int id) { string compare = agentid.tostring(); ...