473,385 Members | 1,727 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

XHTML validation problem

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$MainContentHol der$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.

May 21 '06 #1
1 1420
You might want to look at this, which shows you how to have your pages
render in XHTML:

http://msdn2.microsoft.com/en-US/library/ms178159.aspx

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Code Monkey" <dl********@gmail.com> wrote in message
news:11**********************@j73g2000cwa.googlegr oups.com...
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$MainContentHol der$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.

May 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Greg | last post by:
Hi everybody, so, I would like to use XML files for some parts of my website. I would like to respect W3C XHTML 1.1 recommendation. Then, I have these two docs : o My XML file: <?xml...
17
by: Bruce W...1 | last post by:
I don't seem to be getting anywhere with trying to make my web page transitional XHTML. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
9
by: rbronson1976 | last post by:
Hello all, I have a very strange situation -- I have a page that validates (using http://validator.w3.org/) as "XHTML 1.0 Strict" just fine. This page uses this DOCTYPE: <!DOCTYPE html PUBLIC...
17
by: Leif | last post by:
Hello All, Last week (11 Nov 05) with the Subject header: "XHTML 1.0 Strict validation problem", I tried to describe a validation problem with text added to my source files in XHTML. I was...
9
by: wardy1975 | last post by:
Hi All, Looking for a little expert advice on a few web standards issues. I am currently trying to understand the impact of web standards for a web application I work with. I have been doing a...
11
by: Kidogg | last post by:
Hi all, I'm attempting to write a validator for some email template files we use as part of our e-commerce application (incidentally in C#) and I've run into a problem as I'm not a huge user of...
1
by: Mark Rae | last post by:
Hi, Firstly, I have not the slightest intention of using framesets - the reason for this post is merely to ask for assistance in furthering my understanding of XHTML. I was under the...
1
by: Tatyana | last post by:
Hi All, I have a question regarding validation with XHTML on ASP.Net websites. Our site is built on ASP.NET 2.0 with validation XHTML. Search Engine Optimizer advised us that we should change it...
2
by: Radu | last post by:
Hi. I have been working at home on a web project (VSNET 2005 SP1). Now I have brought the project at work, and I suddenly have plenty of warnings like: Validation (XHTML 1.0 Transitional) -...
10
by: Robert Huff | last post by:
Can someone offer suggestions why, on the same server (Apache 2.2.8), this works <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en-US"> <head> <link rel=stylesheet...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.