本文介绍了文件中的图标图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我想从我的项目文件中显示googlemap图标.以下kod可以工作.
icon.image ="http://labs.google.com/ridefinder/images/mm_20_red.png";
但是,我想从图标文件中显示我的图标,它的名称是1.png.以下kod不起作用;
icon.image ="/icons/1.png";
或
icon.image =〜/icons/1.png";
无法使用,如何使用我的图标而不使用互联网上的图标?
请迅速提供帮助.
Hi Alls,
I want to show googlemap icon from my project file.The following kod works.
icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
but, I want to show my icon from icons file, its name is 1.png. The following kod does not work;
icon.image = "/icons/1.png";
or
icon.image = "~/icons/1.png";
does not work,how can I use my icon without using icon from internet?
Please help, quickly.
推荐答案
icon.image = Server.MapPath("~/icons/1.png");
这篇关于文件中的图标图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!