[thelist] .Net generated HTML not validating - help?

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Wed Oct 5 22:57:46 CDT 2005


> <tr id="_e3f0c7f7c1b76536_Repeater1__ctl0_Tr1">

AFAIK the underscore issue will be sorted out when you give your
controls repeaters and their parent controls (if any) whatsoever
explicit ID's

<asp:hyperlink ... may produce somehting like <a id="_ctl1" ...

whereas

<asp:hyperlink id="MyId" ... may produce <a id="MyId" ...

This will not solve *all* your problems. Though it can bring the page
to a pretty standard-like position. At least page may be
transitionally valid with some exceptions like

<form id="MyForm" name="MyForm" (name not allowed)

<input type="hidden" name="__VIEWSTATE" value="... (input needs to be in a div
or a fieldset sorta container)

One thing you may do before the next release of .Net comes may be to
write a custom filter an wrap it around ermm the servlet request (I
cannot remember the M$ equivalent naming for it :) ). There are
implementation examples around.

However I'm not sure whether it's worth the pain since the new release
will sooner or later sort this issue out (if they did what they have
promissed in the specs)

There are also xhtml-valid controls around which you can buy if your
budget allows to spend some bucks for valid markup. But again, imho,
its not necessary.

HTH,
Volkan.


More information about the thelist mailing list