将图像分配给会话变量 [英] Assign image to session variable

查看:104
本文介绍了将图像分配给会话变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个表College,在该表下为不同的大学存储了许多大学名称和图像

现在,
如何为会话变量分配图像?

在每次搜索中,图片都会更改.

谢谢

Hi,

I have a table College under which many College Name and Images are stored for different colleges

Now,
How to assign images to session variables?

On each search images will change.

Thanks

推荐答案

简单的代码示例:

Simplistic code example:

Session["image"] = db.GetImage(ByIndex);

Image image = (Image)Session["image"];



还有其他方法可以执行此操作,但这应该可以帮助您入门.



There are other ways to do this as well but this should get you started.


这篇关于将图像分配给会话变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆