Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/256.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/20.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# 在Gridview中更快地加载图像_C#_.net_Asp.net_Image Processing_Httphandler - Fatal编程技术网

C# 在Gridview中更快地加载图像

C# 在Gridview中更快地加载图像,c#,.net,asp.net,image-processing,httphandler,C#,.net,Asp.net,Image Processing,Httphandler,我有一个gridview,它显示所有员工的数据和他们的图像(存储在数据库中)。 当我单击“排序”、“分页”或“重新加载”时,完全渲染图像需要更多的时间。 我正在使用httphandler将图像显示为流。 有什么方法可以加快此映像加载速度吗?您可以在HttpContext.Current.cache中缓存字节数组,并从IHttpHandler中的缓存返回它们您可以在HttpContext.Current.cache中缓存字节数组,并从IHttpHandler中的缓存返回它们(如果有)是静态图像且不

我有一个gridview,它显示所有员工的数据和他们的图像(存储在数据库中)。 当我单击“排序”、“分页”或“重新加载”时,完全渲染图像需要更多的时间。 我正在使用httphandler将图像显示为流。
有什么方法可以加快此映像加载速度吗?

您可以在
HttpContext.Current.cache
中缓存字节数组,并从
IHttpHandler
中的缓存返回它们您可以在
HttpContext.Current.cache
中缓存字节数组,并从
IHttpHandler
中的缓存返回它们(如果有)是静态图像且不更改,将其作为资源嵌入到您的项目中,然后调用它们。您可以将缓存添加到httphandler中,以便浏览器缓存图像,这样您就不需要在每次排序时重新检索它们,等等。此httphandler缓存将如何工作?如果它们是静态图像且不更改,则将它们作为资源嵌入到您的项目中,并调用它们。您可以将缓存添加到httphandler,以便浏览器缓存图像,这样您就不必在每次排序时重新检索图像,等等。httphandler缓存将如何工作?