Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET Link Button generating wrong mark up
    primarykey
    data
    text
    <p>I'm having some trouble with a Link Button generating incorrect mark up.</p> <p>It should generate something like this:</p> <pre><code>&lt;div style="margin-top: 5px; width: 150px; margin-left: auto; margin-right: auto;"&gt; &lt;a onclick="return JSConfirm('Confirm?');" id="ctl00_cntPrincipal_btnCancel" class="round-corner opt-upload cancel" href="javascript:__doPostBack('ctl00$cntPrincipal$btnCancel','')"&gt; &lt;div&gt; &lt;span class="border top"&gt; &lt;span class="border"&gt; &lt;/span&gt; &lt;/span&gt; &lt;span class="icon cancel"&gt; Cancel &lt;/span&gt; &lt;span class="border bottom"&gt; &lt;span class="border"&gt; &lt;/span&gt; &lt;/span&gt; &lt;/div&gt; &lt;/a&gt; &lt;/div&gt; </code></pre> <p>Notice only one tag.</p> <p>It ends up generating sometimes this:</p> <pre><code>&lt;div style="margin-top: 5px; width: 150px; margin-left: auto; margin-right: auto;"&gt; &lt;a onclick="return JSConfirm('Confirm?');" id="ctl00_cntPrincipal_btnCancel" class="round-corner opt-upload cancel" href="javascript:__doPostBack('ctl00$cntPrincipal$btnCancel','')"&gt; &lt;/a&gt; &lt;div&gt; &lt;a onclick="return JSConfirm('Confirm?');" id="ctl00_cntPrincipal_btnCancel" class="round-corner opt-upload cancel" href="javascript:__doPostBack('ctl00$cntPrincipal$btnCancel','')"&gt; &lt;span class="border top"&gt; &lt;span class="border"&gt; &lt;/span&gt; &lt;/span&gt; &lt;span class="icon cancel"&gt; Cancel &lt;/span&gt; &lt;span class="border bottom"&gt; &lt;span class="border"&gt; &lt;/span&gt; &lt;/span&gt; &lt;/a&gt; &lt;/div&gt; &lt;a onclick="return JSConfirm('Confirm?');" id="ctl00_cntPrincipal_btnCancel" class="round-corner opt-upload cancel" href="javascript:__doPostBack('ctl00$cntPrincipal$btnCancel','')"&gt; &lt;/a&gt; &lt;/div&gt; </code></pre> <p>Notice now 3 (!) anchor tags.</p> <p>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.</p> <p>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.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload