在网页时,我有个允许输入多行文本的TextBox
我从word的表格里,复制一些数据进来,粘贴到这个TextBox里,
2627787.797 
2627414.108 
2627551.757 
2627561.746 
2627460.245 
可以用如下代码读取        using (StringReader sr = new StringReader(TextBox1.Text.Trim()))
        {
            string strLineData;
            while (!String.IsNullOrEmpty(strLineData = sr.ReadLine()))
            {
                B += Convert.ToDouble(strLineData);
            }
        }
正确,可以把每行数字读出来,读出来的也是正确的,但现在,我想把这些数据在网页生成的时候加进来,我写的代码。
string strX = @"2627787.797
2627414.108
2627551.757
2627561.746
2627460.245
";
        TextBox1.Text = strX;
界面上显示的也是对的,也是一行一行的数字,但
using (StringReader sr = new StringReader(TextBox1.Text.Trim()))
string strLineData;
            while (!String.IsNullOrEmpty(strLineData = sr.ReadLine()))
这样读的时候,每行读出来都是null啊,求大神啊