All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
AJAX进度条_[AJAX教程]
visual c++ MFC调试宏
PHP教程:PHP读取某站点的链接的函数_[PHP教程]
用PHP实现Ftp用户的在线管理_[PHP教程]
分清SQL,Server中易混淆的数据类型_[SQL,Server教程]
SQL,安装_[SQL,Server教程]
ASP.NET日历控件二次开发和使用_[Asp.Net教程]
ASP.NET动态创建控件之绝境求生_[Asp.Net教程]
新手教程:手把手教你学Web,Services,教程_[Asp.Net教程]
加快Sql server时间查询速度的办法_[SQL Server教程]
Reading number is top 10 pictures
The money of more than 100 countries and regions20
9.3阅兵全景图5-地空反舰导弹梯队
NeedWallpaper14
Soong ching ling's former residence2
A man's favorite things5
Cesarean section, bloody, silently into it!2
Chinese paper-cut grilles art appreciation2
A man's favorite things12
The money of more than 100 countries and regions19
西游四格漫画(五)
Download software ranking
Unix video tutorial13
Boxer's Top ten classic battle5
Unix video tutorial6
Jinling thirteen stock
I'm come from Beijing1
Call Of Duty2
Ashlynn Video1
Boxer Classic video1
Unix video tutorial19
电脑知识及技巧大合集
归海一刀 published in(发表于) 2014/1/30 1:28:29 Edit(编辑)
GridView显示服务器图片(保存为图片路径)_[Asp.Net教程]

GridView显示服务器图片(保存为图片路径)_[Asp.Net教程]

GridView显示服务器图片(保存为图片路径)_[Asp.Net教程]
//前台页面创建显示图片列




’ runat="server" /> (注:后台方法名用来得到服务器中全路径)





或者2:


显示图片


" target="_blank">"
alt="" width="20px" height="20px" />









后台代码:

//获取图片
protected string GetImg(string img)
{
string imgurl = ImageURL + img; 注:ImageURL为服务器保存图片文件夹的路径
return imgurl;
}

public static string ImageURL {
get {
string imageurl = ConfigurationManager.AppSettings["ImageURL"].ToString()+"/";
if (imageurl != null) {
return imageurl;
}
return "";
}
}

或者2(显示的图片点击可链接到对应的图片地址):

public static string GetImagePath()
{
return ConfigurationManager.AppSettings["ImageUrl"].ToString();
}


添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.