asp:ImageButton 在加载调试 ASP.NET 时损坏
您好,我有一个 imageButton,当我加载 IE 7 时,它显示图片的图像已损坏,尽管当我进入 VS2010 中的设计时,它显示图片。
这是代码:
<asp:ImageButton ID="calendarImage" runat="server" ImageUrl="d:\mydocuments\ALM\ALM\ALM\imgs\calendar_button.jpg" Height="21px" Width="24px" />
谢谢, 格雷格
Hi I have a imageButton and when I load IE 7, it shows a broken image for the picture, although when I go into Design in VS2010 it shows the picture.
Here is the code:
<asp:ImageButton ID="calendarImage" runat="server" ImageUrl="d:\mydocuments\ALM\ALM\ALM\imgs\calendar_button.jpg" Height="21px" Width="24px" />
Thanks,
Greg
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么要尝试以这种方式设置
ImageUrl="d:\mydocuments\ALM\ALM\ALM\imgs\calendar_button.jpg"
?您应该将这些图像放在您的 Website 文件夹中,然后设置路径,例如...
如果您确实想按照您建议的方式设置 ImageURL,我不会推荐它,但您可以这样做...
您需要使用路径中的
双斜杠
代替单斜杠
Why are you trying to set
ImageUrl="d:\mydocuments\ALM\ALM\ALM\imgs\calendar_button.jpg"
in this way ?You should put these images in your Website folder, then set the path like...
If you really want to set ImageURL the way you are proposing, I would not recommend it, but you can do it like...
You need to use
double slash
insteadsingle slash
in path