Don't Run Javascript Function In Partialview
I add a js file in masterpage. and use it in View.
@Html.LabelFor(model => model.Computers, new { @class = 'control-label' })
Or use script tag in Partial View.(cannot use sections in partial views)
<script>
$("#addItemcomputer").click(function () {
$.get("/TechnicalOfficerService/AddComputerNewRow", function (data) {
$("#computersEditorRows").append(data);
}).fail(function (xhr, err) {
alert("readyState: " + xhr.readyState + "\nstatus: " + xhr.status);
alert("responseText: " + xhr.responseText);
});
});
</script>
Post a Comment for "Don't Run Javascript Function In Partialview"