//绑定类对象的集合到GridView System.Collections.Generic.List<Test> list = new System.Collections.Generic.List<Test>(); Test tt = new Test(); tt.T1 = "test........."; list.Add(tt); this.GridView1.DataSource = list; this.GridView1.DataBind();
------解决方案-------------------- public class Test { private string t1; public string T1 { get { return t1; } set { t1= value; } } } <asp:BoundField DataField="T1" HeaderText="T1" />