Migrating my brain from WebForms to MVC, I want to:
1) click on a button, that will 2) execute some javascript, that will 3) open a new window (or tab, whichever the browser is set for), that will show an existing view from the same solution, and 4) have that view execute some data loads
I'm stuck on 3 and 4
3) in this:
function foo(){
var wrkURL = globalURLVarFromViewOneThatPointsToViewTwo
window.open(wrkURL,"_blank")
}
how do I specify the URL of another existing view (ViewTwo) in the same solution? Is there a helper that I can call within ViewOne that will create that URL within the calling view, and load into globalURLVarFromViewOneThatPointsToViewTwo? Or, if I have to spell out the URL for ViewTwo, what does that syntax look like?
4) How do I get ViewTwo to automatically do some data operations (like find data for a FlexGrid) before or immediately on being displayed? I know how to do an Ajax call to a controller/action on document.ready; is there some other way of calling a controller/action and loading the view.bag, as the view is displayed, instead?