I need to pass some HTML markup to the controller (please see my detalle variable), using jquery, in the action is that I have the problem when I try to send the detalle, it said that is not found, somebody can help me?
$('#BtnPrint').click(function() {
var detalle = "<br><br>";
detalle += " Yo: <b>" + '@Model.DoctorText' + "</b>";
if ('@Model.Exequartur' != "") {
detalle += ", exequatur: <b>" + '@Model.Exequartur' + "</b> <br>";
}
detalle += " certifico haber examinado a: <b>" + '@Model.PatientName' + "</b> <br>";
@*if (@Model.ide != "")
{
detalle += " cedula: <b>" + txtcedula.Text + "</b> <br>";
}*@
detalle += " quien presenta: <b>" + '@Model.Affections' + "</b> <br>";
detalle += " por lo que recomiendo: <b>" + '@Model.Recomendations' + "</b> <br>";
detalle += "<br> dado en: <b>" + ' @Model.Place' + "</b>, " + '@Model.MedicalCertificateDate' +
" <br>";
detalle += "<br><br><br><br> ";
$('#myVar').val(detalle);
var win = window.open(
"@Url.Action("DetailsPrint", "Reports", new {area = "Configurations", id = @Model.Patient.Person.AuthorId, body = detalle, description = "Certificado Medico"})" ) ;
//// var win = window.open('http://stackoverflow.com/', '_blank');
if (win) {
//Browser has allowed it to be opened
win.focus();
} else {
//Browser has blocked it
alert("Porfavor, debes permitir que se abran las ventanas emergentes o el reporte no va a salir :'( ");
}
});
I recomend you to use specific report for each case, you can do it dinamically, but, just one for each type of it, because all of them, have diferent sizes
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments