javascript - How to send HTML content to ASP.NET MVC JSON function? -
this jquery code , next json function hanlde jquery code named insertmatlabjson
.
the problem no text comes in .net json function. . .
function insert() { var url = '<%=url.content("~/") %>' + "matlab/insertmatlabjson"; var text = document.getelementbyid('maincontent_freetextbox1').value $.ajax({ url: url, type: 'get', data: { text: text}, contenttype: 'application/json; charset=utf-8', success: function (response) { //your success code alert("opk"); }, error: function () { //your error code alert("no"); } }); }
public jsonresult insertmatlabjson(string text) {
}
this should it
[allowhtml] public jsonresult insertmatlabjson(string text) { }
Comments
Post a Comment