...全文
230 19 打赏 收藏 转发到动态 举报
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
phenexsura 2012-05-10
  • 打赏
  • 举报
回复
···引错了 孟老师的源码应该是 - -
phenexsura 2012-05-10
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 的回复:]
这样
<asp:Image ID="Image1" runat="server" Width="200" Height="200"
ImageUrl='getimage.ashx?xingming=<%# Eval("教师姓名")%>&isThumb=0' />
[/Quote]

在getimage.ashx页面中取得xingming
string s = HttpUtility.UrlDecode(context.Request.QueryString["xingming"].ToString());
是可以获取正确汉字值的,希望能有点帮助
thinclient 2012-05-09
  • 打赏
  • 举报
回复
顶,我试试
fisher_85 2012-05-09
  • 打赏
  • 举报
回复
也不知道什么情况,帮顶,等高手回答
zj25810 2012-05-09
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 的回复:]

<asp:Image ID="Image1" runat="server" Width="200" Height="200" ImageUrl='getimage.ashx?xingming=" + <%# Eval("教师姓名")%> + "&isThumb=0' />

把<asp:Image>改成HTML标签 <img src="">
[/Quote]对,试试看
thinclient 2012-05-09
  • 打赏
  • 举报
回复
谢朋友们光临寒帖
回单位试试,希望好使
anzhiqiang_touzi 2012-05-09
  • 打赏
  • 举报
回复
<asp:Image ID="Image1" runat="server" Width="200" Height="200" ImageUrl='getimage.ashx?xingming=" + <%# Eval("教师姓名")%> + "&isThumb=0' />

把<asp:Image>改成HTML标签 <img src="">
华生 2012-05-09
  • 打赏
  • 举报
回复
<asp:Image ID="Image1" runat="server" Width="200" Height="200" ImageUrl='getimage.ashx?xingming=" + <%# Eval("教师姓名")%> + "&isThumb=0' />

把<asp:Image>改成HTML标签 <img src="">
thinclient 2012-05-09
  • 打赏
  • 举报
回复
[Quote=引用 16 楼 的回复:]
<asp:Image ID="Image1" runat="server" Width="200" Height="200" ImageUrl='getimage.ashx?isThumb=0&xingming=" + <%# Eval("教师姓名")%> "' />
[/Quote]
谢回复
不行
您的代码在IE解析为:
<img id="Repeater2_ctl20_Image1" src="getimage.ashx?isThumb=0&xingming=" + <%# Eval("教师姓名")%> "" style="height:200px;width:200px;border-width:0px;" />

phenexsura 2012-05-09
  • 打赏
  • 举报
回复
<asp:Image ID="Image1" runat="server" Width="200" Height="200" ImageUrl='getimage.ashx?isThumb=0&xingming=" + <%# Eval("教师姓名")%> "' />
thinclient 2012-05-09
  • 打赏
  • 举报
回复
[Quote=引用 10 楼 的回复:]
<asp:Image ID="Image1" runat="server" Width="200" Height="200"
ImageUrl='<%# Page.ResolveUrl("~/") + "getimage.ashx?xingming=" + Server.UrlEncode( Eval("教师姓名").ToString()) + "&isThumb=0"%>' />……
[/Quote]
孟老师
您的代码在IE中被解析为如下:
<img id="Repeater2_ctl20_Image1" src="/getimage.ashx?xingming=hebing++++++++++++++++++++++++&isThumb=0" style="height:200px;width:200px;border-width:0px;" />
请看怎么修改?
thinclient 2012-05-09
  • 打赏
  • 举报
回复
[Quote=引用 10 楼 的回复:]
<asp:Image ID="Image1" runat="server" Width="200" Height="200"
ImageUrl='<%# Page.ResolveUrl("~/") + "getimage.ashx?xingming=" + Server.UrlEncode( Eval("教师姓名").ToString()) + "&isThumb=0"%>' />……
[/Quote]
如果我不准备引用该Image,ID="Image1"是可以省去的吧?
因为这个Image标签是包含在Listview中的,如果给指定ID,在客户端的html中会重复出现多行ID相同的<img>
thinclient 2012-05-09
  • 打赏
  • 举报
回复
[Quote=引用 10 楼 的回复:]
<asp:Image ID="Image1" runat="server" Width="200" Height="200"
ImageUrl='<%# Page.ResolveUrl("~/") + "getimage.ashx?xingming=" + Server.UrlEncode( Eval("教师姓名").ToString()) + "&isThumb=0"%>' />……
[/Quote]
net_lover一出现,我的问题基本上是有救了,谢主
容我回单位试下
zj25810 2012-05-09
  • 打赏
  • 举报
回复
孟老师都来了~膜拜
孟子E章 2012-05-09
  • 打赏
  • 举报
回复
<asp:Image ID="Image1" runat="server" Width="200" Height="200"
ImageUrl='<%# Page.ResolveUrl("~/") + "getimage.ashx?xingming=" + Server.UrlEncode( Eval("教师姓名").ToString()) + "&isThumb=0"%>' />

getimage.ashx文件在网站根目录下,要是不是,适当修改路径 Page.ResolveUrl("~/") 是根
hanqing_liu 2012-05-09
  • 打赏
  • 举报
回复
这样
<asp:Image ID="Image1" runat="server" Width="200" Height="200"
ImageUrl='getimage.ashx?xingming=<%# Eval("教师姓名")%>&isThumb=0' />

62,266

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧