这个帖子发过一次,当时图片显示了,以为解决了但是灵异的是后面又不显示了,又是红叉叉,我对比过路径
数据库路径为~/uploadImgs/文件名.pic和图片实际路径相同。
新闻写入WriteNews.aspx.cs
uploadfile.PostedFile.SaveAs(Server.MapPath("~\\uploadImgs\\" + newname2 + newext2));
(newname2是文件名,newext2是后缀)数据库查询语句是:
strsql="select top 10 id,title,descr=' '+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));
求解释。图片新闻数据库
数据库路径为~/uploadImgs/文件名.pic和图片实际路径相同。
新闻写入WriteNews.aspx.cs
uploadfile.PostedFile.SaveAs(Server.MapPath("~\\uploadImgs\\" + newname2 + newext2));
(newname2是文件名,newext2是后缀)数据库查询语句是:
strsql="select top 10 id,title,descr=' '+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));
求解释。图片新闻数据库
解决方案 »
- 急急急!关于三层架构的问题
- 表单提交验证问题
- 如何将网页最小化到托盘,跟web 迅雷一样的效果!
- 如何根据GridView中的值来决定DetailsView是否可以编辑?
- 变态要求:Textbox内是一个网址(http://..)能不能点击就近入这个网站?????
- 地址栏中接受中文参数时乱码的问题,,,请教!!
- TextBox的TextMode设置为MultiLine时,把textbox的内容保存到sql server 里面有问题!!各位帮忙啊!!
- 用.net的数据库控件开发asp.net的进来!
- 求用ASP.net+vb.net+sql server2000的分布式应用程序的最好解决方案?
- 如何ListBox将在客户段获得的项目在服务器端获得!
- asp.net c# Repeater 返回记录集函数
- 如何调用一个判断cookie是否存的公共类?
难道要改成~/uploadImgs/<%# DataBinder.Eval(Container.DataItem,"Image")%>才好?