2014-12-03 36 views
-2

我有一个按钮,一些文字,我希望把上的按钮我做这里面新行:“ n”不会的ASP里面工作:按钮的Internet Explorer 10

btn.Text = "Find\n Transactions"; 

这在Internet Explorer 9上正常工作,但在Internet Explorer 10上无法正常工作。

我也尝试了environment.newline变体,但是这并不奏效。

+0

[2线按钮值]的可能重复(http://stackoverflow.com/questions/5053707/2-line-button-value) – walther 2014-12-03 12:56:21

+0

@walther对不起,我没有具体说明ASP:按钮? – 2014-12-03 13:03:50

+0

另一种方式,你可以尝试使用'asp.net'' LinkBut​​ton',它被渲染为'',你可以在里面添加一些html。 – Bharadwaj 2014-12-03 13:12:42

回答

0

只是用这样的:

Environment.NewLine(); 

像这样:

btn.text = "some" + Environment.NewLine() + "text"; 
0

你可以尝试vbCrLf,当然,如果你是在一个web applciation,尝试<br />

0

尝试使用

<asp:Button Text="Hello&#010;World" runat="server" ID="cmdHello" /> 
相关问题