在数据库中的图像扩展器中显示图像 [英] Displaying images in a image extender from the database
本文介绍了在数据库中的图像扩展器中显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从数据库中获取图像并将其显示在图像扩展器上,到目前为止,我只是从文件夹中获取它们.
请帮助
i want to fetch images from the database and display them on the image extender, so far im just getting them from the folder.
Please Help
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static AjaxControlToolkit.Slide[] Slides()
{
AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[6];
slides[0] = new AjaxControlToolkit.Slide("../Slideshow/exclusive.jpg", "", "");
slides[1] = new AjaxControlToolkit.Slide("../Slideshow/20218.jpg", "", "");
slides[2] = new AjaxControlToolkit.Slide("../Slideshow/20223.jpg", "", "");
slides[3] = new AjaxControlToolkit.Slide("../Slideshow/expolsion.jpg", "", "");
slides[4] = new AjaxControlToolkit.Slide("../Slideshow/sama.jpg", "", "");
slides[5] = new AjaxControlToolkit.Slide("../Slideshow/teargas.jpg", "", "");
return (slides);
}
推荐答案
,您可以将这些图像的路径存储在DB中,取回该路径,然后使用该路径显示它们.显然,您需要有一个循环才能填充数组.
干杯...
you can store the path of these images in the DB, fetch the path instead and then display them using that path. Obviously, you would need to have a loop to populate your array.
Cheers...
这篇关于在数据库中的图像扩展器中显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文