如何将图像从一个页面传递到另一个页面 [英] how to pass image from one page to another
本文介绍了如何将图像从一个页面传递到另一个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个在第1页显示图像的网格和一个按钮。如何将包含图像的网格传递到第2页上的另一个网格?任何人都可以帮忙吗?
I have a grid that displays an image on page 1 and a button. How do I pass that grid which has the image to another grid that is on my page 2? Anyone can help please?
推荐答案
将您的图像存储在缓存中以及可以到达该对象的另一页。
例如:
Store your image in the cache and the other page you can reach that object.
For example:
//storing page:
Image obj = //your declaration
Cache["yourImage"] = obj;
//other page:
Image obj = Cache["yourImage"] as Image;
您可以从这里 [ ^ ]。
注意在会话中存储大对象,它会存储在网络服务器内存。
You can read about the caching from here[^].
Be aware of storing big object in session, it will be stored in the web server memory.
这篇关于如何将图像从一个页面传递到另一个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文