DetailsView“DetailsView1”激发了未处理的事件 ItemInserting。

作者:vkvi 来源:ITPOW(原创) 日期:2011-3-4

在 DetailsView 中单击“插入”按钮时,出现错误:DetailsView“DetailsView1”激发了未处理的事件 ItemInserting。

原来是没有给 DetailsView1 指定 DataSourceID。

另一方面

而对应的 ObjectDataSource 若没有指定 InsertMethod,则会出现错误:除非指定 InsertMethod,否则 ObjectDataSource“ObjectDataSource1”不支持插入。

相关文章