XHTML validation problem

C

Code Monkey

I've got a site using master pages.

The problem is that although every supposedly is XHTML, the W3C checker
is failing on an image button. The code on the generated web page is:
<code>
<input type="image" name="ctl00$MainContentHolder$btn_quickSearch"
id="ctl00_MainContentHolder_btn_quickSearch" class="QuickSearch"
src="gfx/Search.gif" alt="Do Search"
onclick="javascript:WebForm_DoPostBackWithOptions(new
WebForm_PostBackOptions(&quot;ctl00$MainContentHolder$btn_quickSearch&quot;,
&quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))"
border="0" /></

</code>

Now, obviously the 'border="0"' is the problem.

The ACTUAL code is
<code>
<asp:ImageButton ID="btn_quickSearch" runat="server"
CssClass="QuickSearch" ImageUrl="~/gfx/Search.gif"
OnClick="btn_quickSearch_Click" AlternateText="Do Search"
EnableTheming="False" />
</code>

So, my question is this: how do I get an image button to generate XHTML
compatable code? Because everything I've tried is NOT working.

Any ideas anyone?

Thanks in advance...Dave.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top