Click here to Skip to main content
15,912,400 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have a table and a button in it, but I can't even select the button because it's in table(I think), so how can I access to buttons event?
This is the code:

XML
<    asp:Table ID="Table1" runat="server" Height="235px" Width="397px">
    <asp:TableRow>
    <asp:TableCell>
        <asp:Button ID="Button1" runat="server" Text="Button" />
    </asp:TableCell>
    </asp:TableRow>
    </asp:Table>



Thanks.
Posted

First of all Why do you need asp:Table. Directly you can make use of Table. After that add the event to the button and you can access the event.
 
Share this answer
 
You can use HTML Table instead of asp Table.

If u still want to access the button event you can say:

<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />


and write the code in :
Button1_Click()
{
//write your code here
} event
 
Share this answer
 
use normal html table tags


to get proper alignment for controls and layouts




<asp:button ----="" xmlns:asp="#unknown">


like that use tags and place controls in that cells
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900