Can anyone advise if its possible to pass data via jQuery to an ASP.NET MVC controller action and have a view rendered in a new browser tab based on the model data passed to the action method.
My scenario is that I have a jQGrid populated with product info on a page. The user would tick the items in the grid that they would like a label produced for. After they’ve made their selection they would click a button and I would like (if possible) to render a view which contains a label for each selected item and have the view render in a new browser tab.
All the code to allow the selections and post the relevant data back to the action method is all working fine and I know its easy to use the jQuery $(selector).load() command to populate an element on the current page with the HTML returned from the action.
But is it possible to populate an element on a page in a new browser tab.
If it is how would I go about it?
Hope this make sense.
You could add
target="_blank"to the form containing the button. The form will post all the necessary data to the controller action and render the results in a new tab.