从图像控制SQL数据库显示特定的图像 [英] Display specific image from SQL database with image control

查看:128
本文介绍了从图像控制SQL数据库显示特定的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用户可以用它来搜索有关的设备(例如计算机),该已进入一个SQL数据库某些信息的搜索页面。他们可以搜索品牌,型号,硬盘的容量和其他东西。一旦他们点击搜索按钮,结果显示在一个中继器控制。每个设备的的DeviceID是可以点击的,点击后,它需要用户拥有所有关于某些设备的细节另一页。我希望能够为在该网页上的某些设备上显示的图像,以及所有的其他信息。我的形象被保存在我的SQL数据库图像类型。但我无法弄清楚如何把它弄出来我的数据库,并在页面上显示。我已经尝试了几种不同的方法,包括在网格控制,没有工作显示它。我使用ASHX文件也试过,但不能完全的数字,一个出门。我使用C#和ASP.NET。任何帮助将大大AP preciated。如果需要任何code,请让我知道,我会很乐意将它张贴。谢谢!

I have a search page that a user can use to search for certain information about a device (ex. computer) that has been entered into a SQL database. They can search for Brand, Type, Hard Drive Capacity and other things. Once they click the search button, results are displayed in a repeater control. The DeviceID for each device is clickable and when clicked, it takes the user to another page that has all the details about that certain device. I want to be able to display the image for that certain device on that page, as well as all the other information. I have the image being saved as Image type in my SQL database. But I can't figure out how to get it out of my database and display it on the page. I've tried a few different approaches including displaying it in a grid control, which didn't work. I also tried using ASHX files but couldn't quite figure that one out either. I am using C# and ASP.NET. Any help would be greatly appreciated. If any code is needed, please let me know and I will be glad to post it. Thanks!

推荐答案

能够解决使用处理程序(ASHX)这种问题。有很多样本网上。试试这个.. HTTP://www.aspdotnet$c$cs.com/Insert_Images_Database.aspx

Was able to solve this kind of issue using a Handler (ASHX). there are a lot of samples online. try this .. http://www.aspdotnetcodes.com/Insert_Images_Database.aspx

这篇关于从图像控制SQL数据库显示特定的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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