Hey there,
another beginner problem. Why isn't the following code with an asp.net page not working?
protected void Page_Load(object sender, EventArgs e)
{
List<string> list = new List<string>();
list.Add("Teststring");
this.GridView.DataSource = list;
}
GridView is the GridView control on that asp page. However, no grid shows up at all. It's both enabled and visible. Plus when I debug, the GridView.Rows.Count is 0. I always assumed you can just add generic Lists and all classes implementing IList as a DataSource, and the gridview will then display the content automatically? Or is the reason here that it's been done in the page_load event handler. and if, how can I fill a grid without any user interaction at startup?
Thanks again.