jquery - How to pass huge data through ajax call using XmlHttpRequest -


i need pass huge data controller. have used xmlhttprequest. have written code like:

var xmlhttp; if (window.xmlhttprequest) {     xmlhttp = new xmlhttprequest(); } else {       xmlhttp = new activexobject("microsoft.xmlhttp");  }  xmlhttp.onreadystatechange = function () {  if (xmlhttp.readystate == 4 && xmlhttp.status == 200) {       document.getelementbyid("mydiv").innerhtml = xmlhttp.responsetext;  } } xmlhttp.open("post", "/home/content", true); xmlhttp.send("content=" + data); 

and actionresult like

[httppost] public actionresult(string content) {       return json("suc", jsonrequestbehavior.allowget); } 

the data like

 uklgripkaabxrujqvla4[...huge piece of data...]kxgtrtkkyke6xap+gyny93kj 

but not passing controller. showing data long. how can rid of this?

send data in post body, passing argument send:

xmlhttp.open("post", "/home/content", true); xmlhttp.send("content=" + data); 

then, on server, read content parameter of post data.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -