I research several post here about this topic and the best performance to me to pass several variables at Url.Action()
/ Url.Content()
under a modal was:
$('a.rengComments').click(function (e) {
e.preventDefault();
var DocID = $('#fact_num').attr('fact_num');
var ArtID = $(this).attr('idnum');
var TipoDoc = $(this).attr('tipo');
var RengID = $(this).attr('rengnum');
var DocNum = $(this).attr('docnum');
var url = '@Url.Content("~/PMContent/CreateRenglonComments/?id=")' + DocID + '&ArtID=' + ArtID + '&TipoDoc=' + TipoDoc + '&RengID=' + RengID + '&DocNum=' + DocNum;
GetModal(url);
});
function GetModal(url) {
var form = $("#Modal-Charge form");
$('#ModalContent').load(url, function (html) {
$("#Modal-Charge").modal('show');
});
}
This post present a good and elegant solution but under modal doesn't work for me, the window.location.href = url.replace('_param_', encodeURIComponent(param));
doesn't replace the parameters
Exist any other solution apart those two publish here at the post?
Thanks you