我想我的Label
使用{0:c2}
格式;然而,這似乎並沒有當我做下面的工作方式:我試圖格式化我的標籤文本
客戶端代碼:
<asp:Label ID="Label4" runat="server" Text="Label" StringFormat="{}{0:c2}"></asp:Label>
服務器代碼(在頁面加載):
Dim dvSql7 As DataView = DirectCast(SqlDataSource7.Select(DataSourceSelectArguments.Empty), DataView)
For Each drvSql7 As DataRowView In dvSql7
Label4.Text = drvSql7("goal").ToString()
Next
是什麼問題是?預先感謝您的幫助。
定義「不工作」。你期望得到什麼,它給你什麼? – Becuzz 2011-06-15 14:29:55
我得到號碼12345.543533,我想要$ 12345.54 – 2011-06-15 14:33:41