0

I have a webform widget and it need to render aria-label within a select tag. When I try the following, it show an error.

<select id="pre-new-year-sel" name="previous-news-year-select" tabindex="5" class="news-drop test"  aria-label='<%$Resources: Labels, SelectAYear %>'>
              <asp:PlaceHolder ID="ItemsContainer" runat="server" />
            </select>

Error is :

Literal expressions like '<%$Resources: Labels, SelectAYear %>' are not allowed. Use <asp:Literal runat="server" Text="<%$Resources: Labels, SelectAYear %>" /> instead.

How to use ASP Literal to set aria attribute within html control?

Thanks Salam

Salam
  • 9
  • 1
  • 5

0 Answers0