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("ctl00$MainContentHolder$btn_quickSearch",
"", true, "", "", 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.
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("ctl00$MainContentHolder$btn_quickSearch",
"", true, "", "", 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.