问题显示按钮 [英] Problem displaying button
本文介绍了问题显示按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在表中用代码声明按钮
I declare button in table with code
<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?
推荐答案
您是否意识到您将一个表放在另一个表中没有明显目的?内部表的元素<td>
在哪里?将所有按钮放在<td> … </td>
下,或将每个按钮放在单独的<td> … </td>
标签下.如果仍然存在问题,请暂时删除样式以查看样式表是否弄乱了东西.另外,您还有多余的>"在末尾(找到>>").
—SA
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
我明白了,我误将这段代码放在母版页的contentPlaceHolder中,这就是为什么它不起作用的原因,还是要感谢很多朋友
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
这篇关于问题显示按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文