asp.net中的Image SlideShow从MYSQL数据库中获取图像 [英] Image SlideShow in asp.net fetching images from MYSQL database

查看:72
本文介绍了asp.net中的Image SlideShow从MYSQL数据库中获取图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


我想在我的asp.net页面上显示幻灯片
我的图像存储在数据库中(MYSQL)

现在,请告诉我从放置控件到编码的完整过程,如果可以的话

因为我不明白要使用哪个控件以及在哪里显示图像(datagrid或其他)

我将非常感激


亲切的问候
alok

Hi Everyone


I want to show a slide show on my asp.net page
my images are stored in database(MYSQL)

now please tell me the complete procedure for it right from placing controls to coding, if you can

as i cant understand which control to use and where to show the images(datagrid or something else)

i would be highly thankful


kind regards
alok

推荐答案

ASP.NET AJAX库具有幻灯片放映控件.您的另一个问题是创建一个页面,该页面根据id返回数据库中每个图像的字节,但是Web上有大量的示例.
The ASP.NET AJAX library has a slideshow control. Your other issue will be to create a page that returns the bytes of each image from you DB based on an id, but there''s tons of samples on the web for that.


为什么不要为图像创建
HttpHandler 

.只需将图像文件字节从数据库中放入,然后将其写入响应流即可.

在客户端放置一个javascript,它将使用setInterval("changeImage()", 1000)
逐个调用图像
在您的函数changeImage()中放入调用Handler的适当路径.

通过JavaScript修改document.getElementById(Img).src时,系统会自动调用您的图片.

;)

for the images. Just put the image file bytes from the database and write it to response stream.

From the client side place a javascript which will call the images one by one using setInterval("changeImage()", 1000)

Inside your function changeImage() put appropriate path which invokes the Handler.

Your Image will be called automatically when document.getElementById(Img).src is modified through javascript.

;)


这篇关于asp.net中的Image SlideShow从MYSQL数据库中获取图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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