我的代码如下:
 private void btnTest_Click(object sender, EventArgs e)
        {
            string strScore;
            int intScore;
            bool blnInput;
            strScore = txtIput.Text;
            blnInput = Int32.TryParse(strScore, out intScore);
            if (blnInput == false)
                Debug.WriteLine("Input does noe evaluate an integer");
            else if (intScore >= 0 && intScore <= 100)
                Debug.WriteLine("You input a number in (0-100)");
            else if (intScore < 0)
                Debug.WriteLine("Test Score cannot be less than zero");
            else if (intScore > 100)
                Debug.WriteLine("Test Score cannot be greater than 100");
            Debug.WriteLine("This line will always print");        }按住Ctrl+F5运行后,显示windows页面,label文本框输入不进数据。请问各位怎么办呀?

解决方案 »

  1.   

    我晕,label文本框是静态文本框,本省就不允许输入数据的,你换成textBox就可以了
      

  2.   

    Label 控件显示用户不能编辑的文本。如果要显示用户可以编辑的文本,请使用 TextBox 控件
      

  3.   

    Label用于显示信息.不可以让用户编辑.用TextBox
      

  4.   

    label控件只能显示信息textbox才可以录入,或者textarea
      

  5.   

    其实是变相的 
    lab你可以根据你按下的哪个键 
    在给lab赋按的键的值 以达到输入的效果,像输入手机号码一样。
      

  6.   

    label控件只能显示信息不能输入
      

  7.   

    label 给以给他动态的赋值,他没焦点赋值的
    懒得说了