我的代码如下:
<input type="button" style="BACKGROUND-IMAGE: url(image\calendar.gif);WIDTH: 27px;HEIGHT: 24px" onclick="calendar(document.Form1.tbInvoiceSendDate)" id="Button1" runat="server"/>原来在.net2003下运行正常,现在升级到.Net2005后,在设计时就看不到按钮的图片了,但程序运行一切正常,请教各位是什么原因?
谢谢
<input type="button" style="BACKGROUND-IMAGE: url(image\calendar.gif);WIDTH: 27px;HEIGHT: 24px" onclick="calendar(document.Form1.tbInvoiceSendDate)" id="Button1" runat="server"/>原来在.net2003下运行正常,现在升级到.Net2005后,在设计时就看不到按钮的图片了,但程序运行一切正常,请教各位是什么原因?
谢谢
解决方案 »
- radiobuttonlist 各项value必须唯一,否则在后台获取值的可能不正确
- 请教个URL导向的问题,是我基础太差吗?求解释
- TreeView中文乱码问题
- 关于datalist中使用javascript的问题。
- 急急急!!!高分请教!在线等!---- 当该页面已经存在时不再打开此页面!
- .net用pop接收来的邮件是base64编码,怎么解?????(求C#代码)
- 关于datalist编辑模式下IE10和Chrome浏览器的显示问题
- jquery.validator提示运行时错误: 无法获取未定义或 null 引用的属性“settings”
- 如何用编程方式用DataGrid按指定顺序选择显示DataAdapter所填充表的指定列?
- DataGrid求救
- 网站发布的问题?
- GridView 更新问题!50分!
1.image是跟bin目录同一级的
2.这个图片地址http://192.168.100.3/payee/image/calendar.gif是可以访问的,改成使用这个也是没有没有显示,但是在设计时,在“样式生成器”中可以看到图片
代码如下:
<input onclick="calendar(document.Form1.tbGatheringInputDate)" type="button" runat="server" style="width: 27px; height: 24px; background-image: url(http://192.168.100.3/payee/image/calendar.gif);"/>
<input type="image" onclick="calendar(document.Form1.tbGatheringInputDate)" id="Image1" src="Image/calendar.gif" />
改成服务器控件也不行还请各位多多指教
在image前面加"../"
还有你不是看不到按钮了,而是按钮的背景图片看不到了,对吧?那是因为你设置的有问题,解决这个问题有2中办法,你可以用服务器端的ImageButon,这个就不用我多说了。你的代码可以加个属性就可以了
<input type="button" style="BACKGROUND-IMAGE:url(image\calendar.gif);background-color:Transparent;WIDTH: 27px;HEIGHT: 24px" onclick="calendar(document.Form1.tbInvoiceSendDate)" id="Button1" runat="server"/>
1.<input type="image" onclick="calendar(document.Form1.tbGatheringInputDate)" id="Image1" src="Image/calendar.gif" />
可以正常显示图片.
是点击时,出现的控件闪一下就没有了。
其实就是要将背景色设置为透明就可以了.