<%@ Register TagPrefix="Title" TagName="TitleShow" Src="/aspnetdata/Title.ascx" %>
<%@Page Debug=True %>
<%@ Import Namespace="System.Globalization" %>
<html>
<head>
	<script language="C#" runat="server">
	Int32 x = 1234567;
	void Page_load(object sender,EventArgs e){
		testNumber.Text=x.ToString();
	}
	void ok_click(object sender,EventArgs e){
		try{
			NumberFormatInfo y = new NumberFormatInfo();
			y.CurrencySymbol = CSymbol.Text;
			y.CurrencyDecimalDigits = Convert.ToInt32(Deci.Text);
			Resault.Text = x.ToString("c",y);
		}
		catch{
			Resault.Text = "输入错误";
		}
	}
</script>
</head>
<body background="/aspnetdata/images/winback.gif">
<Title:TitleShow id="BookT" Runat="server" />
<form runat="server">
测试数字:<asp:label id="testNumber" runat="server" runat="server"/><br>
输入币别符号:<asp:textbox id="CSymbol" width="50" runat="server"/><br>
输入小数位数:<asp:textbox id="Deci" width="50" runat="server"/><br>
<asp:button id="b1" text="OK" runat="server" onclick="ok_click" /><br>
输出结果：<asp:label id="Resault" runat="server" />
</form>