0

I have a WebMethod in Asp.Net and everything looked to be working fine . Suddenly i had to change some parameters and the queries brought in too much data i check the string count = 82452.

The issue is it is taking too much time to show the data . I basically put all the data in a div. And it shows the listing.

Or is it possible the string is broken or something and it is not going to the success function ?But again i think no matter what it should at least go to the success function rite?

Here is the WebMethode:

[System.Web.Services.WebMethod]
public static string getResults(string post)
{
    string newHtml = string.Empty;
    for (int i = 0; i < 10; i++)
    {
            newHtml += Somefunction();
    }
    return newHtml;
}

And here is the JS code:

PageMethods.getResults(pageUrl, results_Text);
function results_Text(result, userContext, methodName) {
        alert("adadasD");
        document.getElementById("mainResults").innerHTML += result;
}

Any suggestion?

slava
  • 1,901
  • 6
  • 28
  • 32
confusedMind
  • 2,573
  • 7
  • 33
  • 74

1 Answers1

0

Looks like the issue is related to this question: Return large string from ajax call using Jquery to Web Method of ASP.NET

And applying the same answer worked.

Community
  • 1
  • 1
confusedMind
  • 2,573
  • 7
  • 33
  • 74