473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Work around for missing asp:img title attribute?

In an MSDN article on high quality design principles combined with
standards driven code, Microsoft states: that the image title attribute
should display when users roll over the image and that Non-visual browsers
will read this text to people who are blind. In my attempts to implement
this I have found that the ASP.Img control does not have an attribute for
title. It is necessary to use the ASP:IMG control instead of the html img
tag in user controls where the path to the image needs to reference the root
of the application. Is there a work-around for this?

Thanks,

Keith
Feb 11 '07 #1
2 9596
In code you can use the Attibutes.Add() method to add any custom attribute
to the asp:image control that you need, including title like so:

myImage.Attributes.Add("title","this is a test");
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"keith" <kb******@dslextreme.comwrote in message
news:ef**************@TK2MSFTNGP04.phx.gbl...
In an MSDN article on high quality design principles combined with
standards driven code, Microsoft states: that the image title attribute
should display when users roll over the image and that Non-visual browsers
will read this text to people who are blind. In my attempts to implement
this I have found that the ASP.Img control does not have an attribute for
title. It is necessary to use the ASP:IMG control instead of the html img
tag in user controls where the path to the image needs to reference the
root of the application. Is there a work-around for this?

Thanks,

Keith

Feb 11 '07 #2
The alt and title attributes work just fine on server-side IMG tags.

<img runat="server" alt="foo" title="bar" />

works like

<asp:Image AlternateText="foo" ToolTip="bar" />

"keith" <kb******@dslextreme.comwrote in message
news:ef**************@TK2MSFTNGP04.phx.gbl...
In an MSDN article on high quality design principles combined with
standards driven code, Microsoft states: that the image title attribute
should display when users roll over the image and that Non-visual browsers
will read this text to people who are blind. In my attempts to implement
this I have found that the ASP.Img control does not have an attribute for
title. It is necessary to use the ASP:IMG control instead of the html img
tag in user controls where the path to the image needs to reference the
root of the application. Is there a work-around for this?

Thanks,

Keith
Feb 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Fabri | last post by:
I guess if it is possible to write a multiline title attribute natively with HTML + CSS. GMail does it and I don't know how. <div title="first linesecond line">My Div</div> Any help...
15
by: christopher diggins | last post by:
I posted to my blog a special pointer class work-around for inheriting from base classes without virtual destructors. I was wondering if there is any other similar work, and whether there are any...
6
by: KS | last post by:
Is it possible to make the title attribute, which shows a text inside a postit, for a html tag get displayed forever when the coursor is over the html tag. I want the postit to be displayed until...
7
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
14
by: Del Ferguson | last post by:
Group, New to this list. I just found out that FireFox does not display the img alt attribute the same way IE does. I use both browsers to verify that my pages are readable. Dumb me for not...
1
by: david | last post by:
I need put some html code into title attribute of A tag, so that user could see html when they move mouse over the link, I think this isn't a standard use, but it does work. The problem is how can...
1
by: Axel Dahmen | last post by:
Hi, I want to add a TITLE attribute to some asp:... controls. How can I do that from my code-behind file? TIA, Axel Dahmen
1
by: kgmahoney | last post by:
in v2 of asp.net when I do a: <asp:hyperlink id="hl1" runat="server" tooltip="xyz" ... it doesn't render as a title attribute of a <a ... tag in firefox even if I do a: <a id="hl1"...
0
by: Leo Smith | last post by:
Is there a way for the title attribute (or tooltip) in firefox to force a new line in the text. In IE I can use the old fall back of '\n', but all variations on the normal C++ carriage returns or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.