Noo*_*ilk 11
文字控制意味着它不输出任何周围的标签.因此,在它的.Text属性中包含您想要的任何标记,并适当地标记它们.
例如
ltlFoo.Text = "<font style='background : orange;'>hello</font>";
Run Code Online (Sandbox Code Playgroud)
Silky是完全正确的,但请为了我的理智,请使用CSS而不是内联样式:
<style type="text/css">
.beautiful
{
font-family: Georgia, serif;
color: #369;
}
</style>
<asp:Literal ID="myLitControl" runat="server" Text="<div class='beautiful'>Some Beautiful Text</div>" />
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
20850 次 |
| 最近记录: |