如何在mvc3 razor视图中保存和检索sql数据库中的图像 [英] how to save and retrieve image from sql database in mvc3 razor view

查看:84
本文介绍了如何在mvc3 razor视图中保存和检索sql数据库中的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在数据库中以二进制格式存储了一些图像,现在我想在我的视图中显示这些图像,我们如何将这些图像从二进制格式再次转换为图像格式?和图像应该显示在webgrid

Hi, I stored few images in database in binary format, now i want to display those images in my view,how can we convert those images from binary format to image format again? and images should be display in "webgrid"

推荐答案

我昨天发表了一篇关于此的文章:

使用EF在SQL Server中监控二进制数据 [ ^ ]



这完全符合您的需求。
I Posted an article about this yesterday :
Storing binary data in SQL Server using EF[^]

This will totally fit your needs.


这篇关于如何在mvc3 razor视图中保存和检索sql数据库中的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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