Bonjour,

J'ai un image bouton "ButtonDelMsg" permettant de suprrimer une ligne de ma gridview lorsque je clique dessus une erreur du type argument de publication ou rappel non valide apparaît.Je ne veux pas modifier le paramètre "EnableEventValidation" de ma page.
Auriez vous une idée d'ou pourrais venir l'erraue sachant que jai deux autre boutons du même type, dans une autre gridview qui focntionne correctement.
Voici ma grdiview :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<asp:gridviewID="GridViewMessages"runat="server"OnPreRender="GridViewMessages_PreRender"OnSelectedIndexChanged="GridViewMessages_SelectedIndexChanged"OnRowCommand="GridViewMessages_RowCommand"datakeynames="CD_MESSAGE"pagesize="5"datasourceid="ObjectDataSourceMessages"autogeneratecolumns="False"ondatabinding="GridViewMessages_DataBinding">
<columns>
<asp:boundfielddatafield="CD_MESSAGE"visible="False"/>
<asp:templatefieldheadertext="Message">
<edititemtemplate>
<asp:textboxid="TextBox1"runat="server"text='<%# Bind("TITRE") %>'></asp:textbox>
</edititemtemplate>
<itemstylewidth="70%"/>
<itemtemplate>
<table>
<tr>
<td>
<asp:labelid="Label1"runat="server"text='<%# Bind("TITRE") %>'font-bold="True"></asp:label></td>
</tr>
<tr>
<tdstyle="border-top: thinsolid; margin-top: 8pt; clip: rect(auto auto auto auto)">
<asp:labelid="Label2"runat="server"text='<%# Bind("CONTENU") %>'></asp:label></td>
</tr>
</table>
</itemtemplate>
<headerstylehorizontalalign="Center"/>
</asp:templatefield>
<asp:boundfielddatafield="DATE"headertext="Date"/>
<asp:boundfielddatafield="AUTEUR"headertext="Auteur"/>
<asp:boundfielddatafield="NBFIC"headertext="Fichier"/>
<asp:commandfieldbuttontype="Image"selectimageurl="~/images/trombonne.gif"showselectbutton="True"
selecttext="Accéder aux fichiers"/>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButtonID="ButtonDelMsg"runat="server"OnClientClick="return confirmSubmit()"CommandArgument='<%#Eval("CD_MESSAGE")%>'CommandName="delMsg"ImageUrl="~/images/poubelle.gif"AlternateText="Supprimer le message"/></ItemTemplate></asp:TemplateField><asp:buttonfieldbuttontype="Image"imageurl="~/images/poubelleGrise.gif"/>
</columns>
<emptydatatemplate>
Pas de messages
</emptydatatemplate>
</asp:gridview><asp:objectdatasourceid="ObjectDataSourceMessages"runat="server"selectcountmethod="getCountMessageByCdThreadAndNom"enablepaging="True"typename="potez.helios.C_MESSAGE"selectmethod="getMessagesAsDataTableByCdThread"oldvaluesparameterformatstring="original_{0}">
<selectparameters>
<asp:sessionparametername="cdThread"sessionfield="CD_THREAD"type="Int32"/>
<asp:sessionparametername="nom"sessionfield="username"type="String"/>
<asp:parametername="startRowIndex"type="Int32"/>
<asp:parametername="maximumRows"type="Int32"/>
</selectparameters>
</asp:objectdatasource><BR/>
Merci à tous pour vos future réponse.