图片按钮没有显示图片. [英] Image button didn't show a image .

查看:75
本文介绍了图片按钮没有显示图片.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我面临一些问题,请任何人帮助我.
我的问题是-我正在使用图像按钮,在我的网络配置中定义的应用程序键

并且我可以像下面提到的那样在我的aspx页面中访问并连接我的图像名称,但是它没有显示.

我的网络配置代码是

Hi guys,

I am facing some problem, any body help me please.
My problem is - I am use a image button , a app key define in my web config

and i am access in my aspx page as like below mentioned and concatenate my image name but it is didn''t show.

My web config code is

<appSettings>
  <add key="PagePath"  value="http://localhost:3007/"/><pre>  </appSettings>




我的页面代码是




and my page code is

<asp:ImageButton ID="imgUpdate" runat="server" ImageUrl='<%$ AppSettings:PagePath %>_Images/btn-edit.jpg' CausesValidation="false" OnClick="imgUpdate_Click" />



谢谢.

Sanwar



Thanks.

Sanwar

推荐答案

AppSettings:PagePath %> _Images/btn-edit.jpg' CausesValidation =" OnClick >/ >
AppSettings:PagePath %>_Images/btn-edit.jpg' CausesValidation="false" OnClick="imgUpdate_Click" />



谢谢.

Sanwar



Thanks.

Sanwar


使用
ImageUrl=''<%# ConfigurationManager.AppSettings["PagePath"] +"_Images/btn-edit.jpg" %>''



但是现在您需要在页面加载中调用Page.DataBind.如果控件的容器是Page之外的另一个控件,则需要为容器控件调用DataBind.

谢谢
罗希特(Rohit)



But now you need to call Page.DataBind in page load. If container of the control is another control other than Page then DataBind needs to be called for container control.

Thanks
Rohit


这篇关于图片按钮没有显示图片.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆