Hi, I'm having some trouble with a Link Button generating incorrect mark up.
It should generate something like this:
<div style="margin-top: 5px; width: 150px; margin-left: auto; margin-right: auto;">
<a onclick="return JSConfirm('Confirm?');" id="ctl00_cntPrincipal_btnCancel"
class="round-corner opt-upload cancel" href="javascript:__doPostBack('ctl00$cntPrincipal$btnCancel','')">
<div>
<span class="border top">
<span class="border">
</span>
</span>
<span class="icon cancel">
Cancel
</span>
<span class="border bottom">
<span class="border">
</span>
</span>
</div>
</a>
</div>
Notice only one tag.
It ends up generating sometimes this:
<div style="margin-top: 5px; width: 150px; margin-left: auto; margin-right: auto;">
<a onclick="return JSConfirm('Confirm?');" id="ctl00_cntPrincipal_btnCancel"
class="round-corner opt-upload cancel" href="javascript:__doPostBack('ctl00$cntPrincipal$btnCancel','')">
</a>
<div>
<a onclick="return JSConfirm('Confirm?');" id="ctl00_cntPrincipal_btnCancel"
class="round-corner opt-upload cancel" href="javascript:__doPostBack('ctl00$cntPrincipal$btnCancel','')">
<span class="border top">
<span class="border">
</span>
</span>
<span class="icon cancel">
Cancel
</span>
<span class="border bottom">
<span class="border">
</span>
</span>
</a>
</div>
<a onclick="return JSConfirm('Confirm?');" id="ctl00_cntPrincipal_btnCancel"
class="round-corner opt-upload cancel" href="javascript:__doPostBack('ctl00$cntPrincipal$btnCancel','')">
</a>
</div>
Notice now 3 (!) anchor tags.
It only happens on a specific server to a specific browser, server is running ASP.NET 2.0 on IIS 6 using Firefox 3.5 to access the page.
Update: I view the code using FF view source, no plugins installed, the document is supposedly XHTML 1.1 Transitional, but I don't think it validates since you can't have div tag inside anchor tags.