如何从数据库中获取图像? [英] How to fetch images from database?

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

问题描述

我在jquery有一个相册的相册。我想将它集成到我的asp.net网站中。问题是图像是硬编码的,我想从数据库中获取它们。我怎么能这样做?



I have a gallery a photo album in jquery. I want to integrate it in my asp.net website. The problem is that the images are hard coded and i want to fetch them from database. How can i do so?

<pre lang="xml">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=ISO-8859-1&quot;&gt;
&lt;title&gt;Google Plus Photo  Album Animation Effect( Photo Stack Animation)with Jquery and CSS3&lt;/title&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;css/reset.css&quot; media=&quot;screen&quot;&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;css/style.css&quot; media=&quot;screen&quot;&gt;
&lt;style type=&quot;text/css&quot;&gt;
ul#pics li {/*css style for the single photo only **/
    background: none repeat scroll 0 0 #FFFFFF;
    box-shadow: 1px 1px 1px #999999;
    display: inline-block;
    width: 153px;
    height:157px;
 -webkit-transition: all .2s ease-in-out;
 -moz-transition: all .2s ease-in-out;
 -o-transition: all .2s ease-in-out;
 -ms-transition: all .2s ease-in-out;
 transition: all .2s ease-in-out;
}
ul#pics li img {/*css style for the single photo only **/
    width: 150px;
    height:150px;
    display: block;
}
ul#pics li:hover {/*css style for the single photo only **/
    -moz-transform: scale(1.1) rotate(0deg);
    -webkit-transform: scale(1.1) rotate(0deg);
    -o-transform: scale(1.1) rotate(0deg);
    -ms-transform: scale(1.1) rotate(0deg);
    transform: scale(1.1) rotate(0deg);
}
.single_photo {/*css style for the single photo only **/
    margin-top : 80px;
    margin-left:100px;

    margin-top:65px;
}
h3 {
    margin:25px;
}
a, a:visited, a:hover {
    color: #54A6DE;
    outline: medium none;
    text-decoration: none;
}
#footer { /* demo footer text */
    font-size:9px;
    margin-top:300px;
    margin-left: 250px;
    color: #888888;
}
#text {
    margin-top:10px;
    margin-left:10px;
    color: #DD4B39;
    font-type: arial, sans-serif;
    font-size:17px;
}

推荐答案

试试这个: ASP.NET的通用Image-From-DB类 [ ^ ]


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

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