这个帖子发过一次,当时图片显示了,以为解决了但是灵异的是后面又不显示了,又是红叉叉,我对比过路径
数据库路径为~/uploadImgs/文件名.pic和图片实际路径相同。
新闻写入WriteNews.aspx.cs
 uploadfile.PostedFile.SaveAs(Server.MapPath("~\\uploadImgs\\" + newname2 + newext2));
(newname2是文件名,newext2是后缀)数据库查询语句是:
strsql="select top 10 id,title,descr='&nbsp;&nbsp;'+SUBSTRING(content,0,100)+'......', picture image from news where picture is not null or picture<>'' order by hits DESC";新闻写入
uploadfile.PostedFile.SaveAs(Server.MapPath("~\\uploadImgs\\" + newname2 + newext2));
求解释。图片新闻数据库