Why doesn't a LinkButton work with a table as it's content?
Posted
by
Telos
on Stack Overflow
See other posts from Stack Overflow
or by Telos
Published on 2010-07-16T17:29:07Z
Indexed on
2010/12/28
4:54 UTC
Read the original article
Hit count: 290
Using ASP.NET 3.5, you can create a LinkButton then define content inside of it. It works fine if I have div tags or any kind of text or anything, but if I use a table the click doesn't actually post back for some reason. This should take you to google (you'll get an error there but it should still go) for instance:
<asp:LinkButton ID="lbTest" PostBackUrl="http://www.google.com" runat="server">
<table>
<tr>
<td>Test</td>
<td>col2</td>
<td>col3</td>
</tr>
</table>
</asp:LinkButton>
I could work around it by building a "table" with divs I guess, but I hate formatting with divs.
© Stack Overflow or respective owner