Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 从webmethod Asp.Net返回大字符串时加载时间过长_C#_Asp.net_Webmethod_Load Time - Fatal编程技术网

C# 从webmethod Asp.Net返回大字符串时加载时间过长

C# 从webmethod Asp.Net返回大字符串时加载时间过长,c#,asp.net,webmethod,load-time,C#,Asp.net,Webmethod,Load Time,我在Asp.Net中有一个WebMethod,一切看起来都很好。突然,我不得不更改一些参数,查询带来了太多的数据,我检查了字符串count=82452 问题是显示数据花费的时间太长。我基本上把所有数据放在一个div中,它显示了清单 或者可能字符串被破坏了或者其他什么东西,它不会进入成功函数吗?但我再次认为,不管它是什么,至少应该进入成功函数 以下是WebMethode: [System.Web.Services.WebMethod] public static string getResults

我在Asp.Net中有一个WebMethod,一切看起来都很好。突然,我不得不更改一些参数,查询带来了太多的数据,我检查了字符串
count=82452

问题是显示数据花费的时间太长。我基本上把所有数据放在一个div中,它显示了清单

或者可能字符串被破坏了或者其他什么东西,它不会进入成功函数吗?但我再次认为,不管它是什么,至少应该进入成功函数

以下是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;
}

有什么建议吗?

看起来这个问题与这个问题有关:


应用相同的答案是有效的。

您需要显示生成issue@Sayse. 请参阅更新问题。。
PageMethods.getResults(pageUrl, results_Text);
function results_Text(result, userContext, methodName) {
        alert("adadasD");
        document.getElementById("mainResults").innerHTML += result;
}