Categories
C#.NET Google Microsoft VB.NET Visual Studio W3C Windows 7 Windows 8 / 8.1 Windows Server 2008 Windows Server 2012 Windows Vista Windows XP

W3C validator – “there is no attribute “border””

When you try to validate your page with W3C Markup Validation Service at the line when you have an ImageButton like this:

[sourcecode language=”html”]<asp:ImageButton runat="server" ToolTip="Click here to load new image" ID="ImageButtonRefresh" ImageUrl="images/refresh.png" OnClick="ImageButtonRefresh_Click" CausesValidation="false" />[/sourcecode]

show the following error message:

there is no attribute “border”

Cause:
<asp:ImageButton> renders a border=”0″ output.

Solution:
Add ClientTarget=”uplevel” in your page’s Page directive, for example:

[sourcecode language=”html”]<%@ Page Language="c#" MasterPageFile="~/MasterPage.master" ClientTarget="uplevel" %>[/sourcecode]

Did my solution solve your problem? Leave a reply.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.