Posted on: 4/1/2015 3:48:15 PM | Views : 697

I my A`SP.NET Webforms` app, I have a `table` in which I add all data dynamically. One row contains `Buttons` in each cell. I want the button to fire `onclick` event when the user clicks on it. But, with the below code, the event never fires and the table disappears. Here's the code :
<asp:Table ID="floorTable" runat="server" Width="100%" GridLines="Both"> </asp:Table>
In Code behind
// This method is called on a DropDownList SelectedItemChanged Event - so // the buttons cannot be created in Page_Load or so. Have to create // totally based on the DropDown selected item. private void PopulateFloorRow(int floorNo, FloorPattern fp) { int cols = fp.UnitPattern.Count; // HEADER ROW TableRow thead = new TableRow(); thead.Width = Unit.Percentage(100); thead.TableSection = TableRowSection.TableHeader; TableCell theadCell = new TableCell(); ...

Go to the complete details ...