Bonjour,
Je souhaite utiliser un formview dans une page rattachée à une page maitre. Tout fonctionne bien en mode lecture (les champs sont correctement remplis). Par contre en mode edition, les evenements attachés aux boutons ne sont plus générés (itemcommand et modechanging) et les champs ne sont plus remplis lors du retour en mode lecture
Voici le code de ma page :
<%@ Page Title="" Language="VB" MasterPageFile="~/Pages maitres/A.Master" AutoEventWireup="true" CodeFile="maison.aspx.vb" Inherits="general" %>
<asp:Content ID="Content3" ContentPlaceHolderID="contenu" Runat="Server">
<p id="menu_actions">
<asp:HyperLink ID="HlkImprimer" runat="server">Imprimer</asp:HyperLink>
</p>
<asp:FormView ID="FvwGeneral" runat="server" OnItemUpdating="FvwGeneral_ItemUpdating"
OnItemInserting="FvwGeneral_ItemInserting" OnItemDeleting="FvwGeneral_ItemDeleting" OnItemCommand="FvwGeneral_ItemCommand" OnModeChanging="FvwGeneral_ModeChanging">
<ItemTemplate>
<asp:Label ID="LblSG" runat="server" Text="S. G : "></asp:Label>
<asp:Label ID="LblCS" runat="server" Text='<%# Eval("CS") %>'></asp:Label>
<asp:Label ID="LblCN" runat="server" Text='<%# Eval("CN") %>'></asp:Label>
<asp:Button ID="LkbEdit" Text="Modifier" CommandName="Edit" runat="server" />
<asp:Button ID="LkbDelete" Text="Supprimer" CommandName="Delete" runat="server" />
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="LblSG" runat="server" AssociatedControlID="TxbSG"
Text="S. G : "></asp:Label>
<asp:TextBox ID="TxbSG" runat="server" Text='<%# Bind("CS") %>'></asp:TextBox>
<asp:TextBox ID="TxbNS" runat="server" Text='<%# Bind("CN") %>'></asp:TextBox>
<asp:Button ID="LkbUpdate" Text="Update" CommandName="Update" runat="server" />
<asp:Button ID="LkbCancel" Text="Cancel" CausesValidation="false" CommandName="Cancel"
runat="server" onclick="LkbCancel_Click" oncommand="LkbCancel_Command" />
</EditItemTemplate>
</asp:FormView>
</asp:Content>
Je ne vois pas d'où peut provenir mon probleme...
Merci d'avance pour votre aide
Stéphane