开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜