I am using .net 4.5 and I found this strange behavior:
Markup:
<asp:DetailsView ID="dtvTest" AutoGenerateRows="true" DefaultMode="Insert" runat="server" />
code:
protected void Page_Load(object sender, EventArgs e) { DataTable dt = new DataTable("Test"); dt.Columns.Add("Column", typeof(string));
result
A collection cannot be null. Parameter Name: c
thrown at dtvTest.DataBind ().
If there is at least one line, it works! (see commented line).
Any idea on how to fix / get around it?
Thank you very much
source share