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");              }          });   }
, json function in asp.net mvc

 public jsonresult insertmatlabjson(string text)     { 

}

this should it

[allowhtml] public jsonresult insertmatlabjson(string text) {  } 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -