Duplicate display of a DetailsView when going to EDIT / INSERT mode
I have a DetailsView with several fields. On the same page, I have both LinkButton that enables to go in edit or insert mode for the DetailsView.
When I click on a button, lin开发者_Python百科ked code-behind is doing the following :
switch (buttonCmd.ID)
{
case "cmdEdit":
DetailsView1.ChangeMode(DetailsViewMode.Edit);
break;
case "cmdInsert":
DetailsView1.ChangeMode(DetailsViewMode.Insert);
break;
This kind is working fine in another page from the site website but not on this one... Probably a bad copy-paste...
Any idea that could explain why DetailsView is displayed twice ?
Clear the datasource of the detailsView before re-binding after Edit/ Insert operation.
精彩评论