dimanche 3 avril 2016

How to pass data in dynamic javascript inside partial view

.cshtml file
var rqs_cnt= 3

function abc (e)
{
$(e.parentNode).after(
 @Html.Partial("xyz", new ViewDataDictionary { { "Name", "company" + rqs_cnt }, { "SelectEvent", "onChange" } })');

}
</script>

Getting error that "rqs_cnt" not defined.

Please help me on this

Aucun commentaire:

Enregistrer un commentaire