我有一个按钮,一些文字,我希望把上的按钮我做这里面新行:“ n”不会的ASP里面工作:按钮的Internet Explorer 10
btn.Text = "Find\n Transactions";
这在Internet Explorer 9上正常工作,但在Internet Explorer 10上无法正常工作。
我也尝试了environment.newline变体,但是这并不奏效。
我有一个按钮,一些文字,我希望把上的按钮我做这里面新行:“ n”不会的ASP里面工作:按钮的Internet Explorer 10
btn.Text = "Find\n Transactions";
这在Internet Explorer 9上正常工作,但在Internet Explorer 10上无法正常工作。
我也尝试了environment.newline变体,但是这并不奏效。
只是用这样的:
Environment.NewLine();
像这样:
btn.text = "some" + Environment.NewLine() + "text";
你可以尝试vbCrLf,当然,如果你是在一个web applciation,尝试<br />
尝试使用
<asp:Button Text="Hello
World" runat="server" ID="cmdHello" />
[2线按钮值]的可能重复(http://stackoverflow.com/questions/5053707/2-line-button-value) – walther 2014-12-03 12:56:21
@walther对不起,我没有具体说明ASP:按钮? – 2014-12-03 13:03:50
另一种方式,你可以尝试使用'asp.net'' LinkButton',它被渲染为'',你可以在里面添加一些html。 – Bharadwaj 2014-12-03 13:12:42