Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8811305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:19:49+00:00 2026-06-14T03:19:49+00:00

The title says it all, really. I’ve found the Image.GenerateEmptyAlternateText property on the ASP.NET

  • 0

The title says it all, really.

I’ve found theImage.GenerateEmptyAlternateText property on the ASP.NET Image control and now I’m wondering if there’s any difference in setting
<asp:Image GenerateEmptyAlternateText="True" /> and <asp:Image AlternateText="" />?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:19:51+00:00Added an answer on June 14, 2026 at 3:19 am

    Turns out setting AlternateText=”” doesn’t work to set an empty alt text, if it set to an empty string, it gets omitted when the image HTML is rendered. To get alt=””, one has to use the GenerateEmptyAlternateText property.

    See below from “Accessibility in Visual Studio 2010 and ASP.NET 4“

    ASP.NET controls that render images omit the alt attribute in the
    rendered HTML if you simply assign an empty string to the
    AlternateText property. For example, suppose you add the following
    ASP.NET Image control to a page:

    <asp:Image ImageUrl="PageDivider.gif" AlternateText="" Runat="Server" />
    

    In this case, the following HTML is rendered:

    <img src="PageDivider.gif" />
    

    Notice that the alt attribute has disappeared. This is the default
    behavior of all ASP.NET control attributes. When you do not assign an
    attribute a value, it is not rendered. Unfortunately, in this case, we
    really want to render an empty string as the alt attribute value.

    In order to make sure that HTML rendered for an ASP.NET Image control
    includes alt=””, you must set the GenerateEmptyAlternateText property
    to true.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The title really says it all. Under some (undetermined) conditions FB.getLoginStatus() just stops working
the title really says it all. I'm trying to populate a fullcalendar widget through
The title really says it all. The and ... means also include pselect and
The title really says it all: what is the difference between minus one and
The title pretty much says it all. I've been searching and I haven't really
Title really says it all. There is the -O option for opening splits vertically,
Assuming you're doing CI , the title really says it all: What tools do
The title really says it all, a bit more info though for those who
Question title says it all really - a lot slower than VS2005, with a
Title says all. Sample code: ArrayList<HashMap<String, Object>> data = new ArrayList<HashMap<String, Object>>(); HashMap<String, Object>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.