I am not sure what is going on here.
I have an action method that is called in a jquery script that I have...
ondblClickRow: function (id) {
debugger;
var dummyURL ='@Url.Action("EditEncounter", "EditEncounter", new { encounterId = 0, popId = (int)TempData["POPULATIONID"] })';
var path = dummyURL.replace("-2", id);
document.location.href = path;
//new { encounterId = temp.EncounterId, popId = (int)TempData["POPULATIONID"] }'
}
for some reason when I attempt to navigate to this page via this route using chrome I get this exception:
The parameters dictionary contains a null entry for parameter 'popId' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult EditEncounter(Int32, Int32)' in 'FocusedReadMissionsRedux.Controllers.EditEncounterController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Parameter name: parameters
But in IE, I call the action method and I navigate to the appropriate page without incident. I must be missing something?
UPDATED I noticed that I was getting this query string...
encounterId=2245&popId=2
Notice thte '&
' and the 'amp;
'. I am thinking that my route is not being set up correctly. I will try a couple of things and let you gents know what happens.
CONFIRMED
this is the route I have in internet explorer
encounterId=2245&popId=2
And it works. I just need to figure out why this happens for this particular request.
UPDATE
Visual studio is not updating the cshtml files that are generated when I attempt to debug my program. Anybody every experience this and how to get by it?