public string FindJpg(string imageurl)
{
if (imageurl.EndsWith( ".jpg ") || imageurl.EndsWith( ".gif ") || imageurl.EndsWith( ".bmp "))
//return " <asp:Image id=muid ImageUrl= ' "+imageurl+ " ' runat= 'server ' height=120px /> ";
return " <img src= ' " + imageurl + " ' height=136px border=0px width=134px> ";
else
return " <img src= 'images/nopic.JPG ' height=136px border=0px width=134px> ";
}
注:imageurl为数据库中存的路径如:~/UploadImages/Expert/2007_08_23 09_17_00_郭燕杰.jpg
现在第一个return后的路径不知道该怎么写,才能在放到服务器上后能看到图片
谢谢大家!
------解决方案--------------------------------------------------------
if(UploadImages.father==images.father)
imageurl = imageurl.substring(2);