数据有效性检测问题,结果不能显示在LABLE 标签中,代码如下,请高手指点
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        &nbsp;<span style="font-size: 24pt">&nbsp; 计算组合数<br />
            <br />
            &nbsp;<br />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            <br />
            <br />
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span style="font-size: 12pt">
                输入N:
                <asp:TextBox ID="txtN" runat="server" ></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtN"
                    Display="None" ErrorMessage="必须输入n的值" ForeColor="Indigo"></asp:RequiredFieldValidator><br />
                &nbsp;<br />
                <br />
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; 输入M:
                <asp:TextBox ID="txtM" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtM"
                    Display="None" ErrorMessage="必须输入m的值"></asp:RequiredFieldValidator><br />
                &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br />
                <br />
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
                    ShowSummary="False" />
                &nbsp;<br />
                <br />
                <br />
                <br />
                <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtN"
                    Display="None" ErrorMessage="n有效数值范围1~20" MaximumValue="20" MinimumValue="1"
                    Type="Integer"></asp:RangeValidator>
                <asp:RangeValidator ID="RangeValidator2" runat="server" ControlToValidate="txtM"
                    Display="None" ErrorMessage="m有效数值范围1~20" MaximumValue="20" MinimumValue="1"
                    Type="Integer"></asp:RangeValidator><br />
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtN"
                    ControlToValidate="txtM" Display="None" ErrorMessage="m要小于等于n" Operator="LessThanEqual"
                    Type="Integer"></asp:CompareValidator><br />
                <br />
                <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="txtN"
                    Display="None" ErrorMessage="只能输入数字" Operator="DataTypeCheck" Type="Integer"></asp:CompareValidator><br />
                <br />
                <asp:CompareValidator ID="CompareValidator3" runat="server" ControlToValidate="txtM"
                    Display="None" ErrorMessage="只能输入数字" Operator="DataTypeCheck" Type="Integer"></asp:CompareValidator><br />
                <br />
                <asp:Button ID="btnCalculate" runat="server" Text="计算" /><br />
                <br />
            <asp:Label ID="lblInfo" runat="server" Text="Lable"></asp:Label><br />
                <br />
                <br />
                <br />
                <br />
                <br />
                &nbsp;
                <br />
            </span></span>
    
    </div>
    </form>
</body>
</html>
Aspx。CS代码:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
        private long CalculateFactorial(int n)//计算n!
        {
           long sum=1;
           while (n >= 1)
           {
               sum = sum * n;
               n--;
           }
            //for (int i = n; n > 0; n--)
            //{
            //    sum = n * CalculateFactorial(n - 1);
            //}
            return (sum);
                  }      private long CalculateCombinatorics(int n,int m)//计算组合
      {
        return CalculateFactorial(n)/(CalculateFactorial(m)*CalculateFactorial(n-m));
      }
      protected void  btnCalculate_Click(object sender, EventArgs e)//按钮
     {
        int n=Convert.ToInt32(txtN.Text);
        int m=Convert.ToInt32(txtM.Text);
        lblInfo.Text=string.Format("C({0},{1})={2}",n,m, CalculateCombinatorics(n,m));
        Response.Write(lblInfo.Text);
     }
  
}