Search code examples
javascriptasp.nethtmlserver-sideserverside-javascript

How can I add custom HTML attributes to an ASP.NET label without code-behind access?


I am making some modifications to a website, but it is hosted by a third party so I don't have code-behind access, how can I add custom HTML attributes (Rich Snippets) to an ASP label or other element?

Code: <asp:Label ID="lblPositionTitle" runat="server"></asp:Label>

Thank you in advance


Solution

  • I think this will work:

    <asp:Label ID="lblPositionTitle" runat="server" richAttribute="value"></asp:Label>