asp.net DataList中一列的数据本来很长  但是读出来却很短数据库中本来是有下面这串数据的”专业好不好,到底是各花入各眼,还是繁花扰人眼?在综合了声望度、期望值、报考热度、适宜推广度和就业局面五个因素后,我们在这里推“
但是 DataList读取后就变成“专业好不好,到底是各花入各眼,还是繁花扰”这么一点点了  是什么原因啊

解决方案 »

  1.   

    你有添加这个属性me
    Width="100%"
      

  2.   

    用Response.Write()打印出来看看不就知道了,看你那里出问题了没
      

  3.   

    我是调用方法绑定的     <asp:BoundField DataField="EContent" HeaderText="内容" 
                        SortExpression="EContent" />
            public static EducationInformation GetEducationById(int eId)
            {
                string sql = "SELECT * FROM EducationInformation WHERE eId = @eId";
                using (SqlDataReader reader = DBHelper.GetReader(sql, new SqlParameter("@eId", eId)))
                {
                    if (reader.Read())
                    {
                        EducationInformation education = new EducationInformation();
                        education.EId = (int)reader["eId"];
                        education.Title = (string)reader["Title"];
                        education.Time = (string)reader["Time"].ToString().Substring(0,8);
                        education.EContent = (string)reader["eContent"];
                        reader.Close();
                        return education;
                    }
                    else
                    {
                        reader.Close();
                        return null;
                    }
               
      

  4.   

    你看看你这个字段在数据库里面的长度是多少,你的这个字段,长度应该是“nvarchar(20)”,如果你需要的这个字段长度很长, 那么改为“Ntext”吧
      

  5.   

    首先查看HTML源代码,确认你的数据是完整的,如果完整是CSS样式的原因,如果不完整说明你有函数把它给截取了