aspx
<asp:Repeater ID="zjjs" runat="server">
<asp:Image ID="doctor" width="90" height="120" ImageUrl='<%#"../pic/doctor/"+ Eval("Pic")%>' runat="server" />aspx.cs
DataView dv = expert.ShowExperts(Int32.Parse(Request.Params["ShowID"].ToString()));
DataTable dt = dv.ToTable();
DataTable Newdt = new DataTable();
Newdt.Columns.Add(new DataColumn("Pic", typeof(string)));
drow[1] = dt.Rows[i]["Pic"].ToString();
this.zjjs.DataSource = Newdt;
this.zjjs.DataBind();数据库pic字段值是images1.jpg
就是显示不出来图片
<asp:Repeater ID="zjjs" runat="server">
<asp:Image ID="doctor" width="90" height="120" ImageUrl='<%#"../pic/doctor/"+ Eval("Pic")%>' runat="server" />aspx.cs
DataView dv = expert.ShowExperts(Int32.Parse(Request.Params["ShowID"].ToString()));
DataTable dt = dv.ToTable();
DataTable Newdt = new DataTable();
Newdt.Columns.Add(new DataColumn("Pic", typeof(string)));
drow[1] = dt.Rows[i]["Pic"].ToString();
this.zjjs.DataSource = Newdt;
this.zjjs.DataBind();数据库pic字段值是images1.jpg
就是显示不出来图片
解决方案 »
- 菜鸟提问:如何取出Arraylist 对象的值呢????在线等~~~
- 一个脚本操作TreeView的问题,大家帮帮忙啊,弄了一天没搞定,这是aspx文件的内容
- 在vs2005中关闭Word出现警告信息,应该如何写关闭代码?
- 做了一年的数据库管理系统,觉得都是做些重复的工作,不知道往什么方向学
- 求读文件写数据库的例子
- 各位大哥,怎样在DataGrid 列中加入Button!?(C# winform)
- 项目里加入图片问题
- 取消触发button_Click事件怎么做?
- 使用notifyIcon控件调试时任务栏出现2个相同图标
- C#中绘制和编辑可缩放矢量几何图形
- window.showModalDialog回传参数问题
- 怪,又是这个异常
ImageUrl='../pic/doctor/"+<%# Eval("Pic")%>'
<asp:Image id="imgdz" runat="server"
ImageUrl='<%# Eval("dzname","daxing_abate/dazeimages/image/{0}.jpg") %>'
Height="100px" Width="120px" ToolTip='<%#Eval("dzname") %>'/>
ImageUrl='../pic/doctor/<%#Eval("Pic")%>'>