开发者

Simple ASP.net ToolTip (for FireFox)

I have an ImageButton in ASP.Net on my site, filled with the property ToolTop:

<asp:ImageButton CausesValidation="false" Enabled="false" ID="imgHelp" ImageUrl="Images/Icons/help.png" Width="15px" Height="15px"
                            runat="server" ToolTip="Die Referenz der Anfrage, z.B.: Bieter- oder Auktionsnummer"  />

But in FireFox the ToolTip开发者_StackOverflow isn't shown up.

Someone an Idea for which reasen OR know a good free to use ToolTip-UC?


This is the generated code:

<input type="image" name="ctl00$ContentPlaceHolder1$imgHelp" id="ctl00_ContentPlaceHolder1_imgHelp" disabled="disabled" title="Die Referenz der Anfrage, z.B.: Bieter- oder Auktionsnummer" src="Images/Icons/help.png" style="height:15px;width:15px;border-width:0px;" />

Ok I see my problem, when the ImageButton is Enabled, the tooltip works, but the user can click on it (what I don't want). Any ideas?


My guess is it won't work in Firefox because you have the control's enabled property set to false. If you set it to true does this fix the problem?

Update- this is by design in Firefox. If you want to get round this, you will have to use something like a JavaScript tooltip mechanism.

Update 2:

Use the asp:Image tag:

<asp:Image runat="server" ID="the Id" 
   ToolTip="Die Referenz der Anfrage, z.B.: Bieter- oder Auktionsnummer"  
   ImageUrl="TheImage.jpg" 
   AlternateText="Some alt here" />


I don't know ASP.NET, but I'm sure looking at the generated HTML will tell you more on why it doesn't work in Firefox.


You can try adding "onclick=return(false);" so that clicking means nothing. Also change the css of the pointer to normal so it won't even appear as clickable.


How to apply the css for
ToolTip="Die Referenz der Anfrage, z.B.: Bieter- oder Auktionsnummer" in any control

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜