2
4

3 に答える 3

3

SUPタグを使用します。

lblAmount.Text = Amount & "<sup>€&lt;/sup>"
于 2010-01-01T20:37:30.120 に答える
1

これを行うには、スタイル属性を追加するか、クラスを追加します(そして、スタイルタグまたはcssファイルにスタイルを追加します。

<asp:Label id="lblAmount" runat="server"></asp:Label><asp:Label id="lblAmountSymbol" runat="server" CssClass="yourclass"></asp:Label>

span.yourclass {
    font-size:9px; 
    vertical-align:top; 
}

また

<asp:Label id="lblAmount" runat="server"></asp:Label><asp:Label id="lblAmountSymbol" runat="server"></asp:Label>

そしてこれ、あなたのコードファイルで

Me. lblAmount.Style.Add(HtmlTextWriterStyle.FontSize, "9px")
Me. lblAmount.Style.Add(HtmlTextWriterStyle.VerticalAlign, "top")

htmlと同等のsupを使用することもできます。

Me. lblAmount.Text = Amount & " <sup>€&lt;/sup>"
于 2010-01-01T20:41:39.110 に答える
0
Goto Start->Programs->Accessories->System tools->Character Map
Now select this Character ² from the Characters listed.
Click Select
Click Copy

Then try to change the text of any control by pasting this Character in the Lable or Button Caption at Properties.

Even you can wrting code also like this:
Code\Button1.Text = "mm ²"\Code

This is working fine with me.
于 2010-01-01T20:42:39.997 に答える