4
onSelectRow: function(id) {
   document.location.href = '@Url.Action("EditEncounter", "EditEncounter", new { encounterId = "'<%:id%>'", popId = TempData["POPULATIONID"] })'
                            //new { encounterId = temp.EncounterId, popId = (int)TempData["POPULATIONID"] }
}

How in sam hill do I get that id variable into my Url.Action method?

This is what I am looking at when I debugg

document.location.href = '/EditEncounter/EditEncounter?encounterId=%40id&amp;popId=2'

1 Answer 1

4
var dummyURL ='@Url.Action("EditEncounter", "EditEncounter", new { encounterId = -2, popId = TempData["POPULATIONID"] })';
                            var path =dummyURL.replace("-2", id);
                            debugger;
                            document.location.href = path;

That appears to work.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.