Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I declare button in table with code
ASP.NET
<table>
<tr>
<td><asp:button runat="server" id="btn" text="Button" onclick="btn_Click"/> </td>
<td><asp:button runat="server" id="btn2" text="Button2" onclick="btn2_Click"/> </td>
<td><asp:button runat="server" id="btn3" text="Button3" onclick="btn3_Click"/> </td></tr>

</table>




But the button doesn't appear in browser when I run program, it appears in design view but not when executed.
I write that code in master page and inherit other pages from it it doesn't work.
Does anyone know the problem?
Posted
Updated 21-Sep-11 21:38pm
v5

Do you realize that you put a table inside another table with no apparent purpose? Where is the element <td> of the inner table? Put all buttons under <td> … </td> or put every button under a separate <td> … </td> tag. If this is still a problem, temporarily remove the styles to see if the stylesheets screw up things. Also, you have extra ">" at the end (find ">>").

—SA
 
Share this answer
 
Comments
fjdiewornncalwe 21-Sep-11 16:21pm    
+5. I was about to put the same thing down.
Sergey Alexandrovich Kryukov 21-Sep-11 17:21pm    
Thank you, Marcus.
--SA
rkthiyagarajan 21-Sep-11 20:51pm    
5+..
Asad_Iqbal 22-Sep-11 3:42am    
Sorry the question was like that in coding i update it there isn't any problem with code cause it won't run if there is? i use similar code in other places it works but when declare it in master pager and inherit them it doesn't work.
Oooooopppppppppppppppssss i got it, i mistakenly put this code in contentPlaceHolder of master page that's why it doesn't work thanks alot anyway friends
 
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