ImageButton.OnCommand

Résolu/Fermé
Hadil6 Messages postés 9 Date d'inscription mardi 5 mai 2015 Statut Membre Dernière intervention 14 octobre 2015 - Modifié par Whismeril le 5/05/2015 à 23:01
Hadil6 Messages postés 9 Date d'inscription mardi 5 mai 2015 Statut Membre Dernière intervention 14 octobre 2015 - 5 mai 2015 à 15:31
Salut,
En essayant de tester mon website sous Firefox j'ai rencontre un petit probleme.
La methode ImageButton.OnCommand ne fonctionne pas sous Firefox par contre le fonctionnement est normal sous IE.
Ci dessous un extrait du code notant que ImageButton fait parti d'une DataList:

 <asp:ImageButton ID="Image1" runat="server" ImageUrl='<%# Eval("Picture", "~/images/{0}")%>' CommandName="ViewDetails" CommandArgument='<%#Eval("ProductID") %>' OnCommand="Click_LinkButton1" Width="100px" Height ="150px"></asp:ImageButton> 
 </td> 


protected void Click_LinkButton1(object sender, CommandEventArgs e) 
 { 
 string url = "ViewProduct.aspx?"; 
 url += "DepartmentID=" + HiddenField1.Value; 
 url += "&CategoryID=" + HiddenField2.Value; 
 url += "&ProductID=" + e.CommandArgument; 
 Response.Redirect(url); 
 } 


Pourriez vous m'aider svp?

EDIT: Ajout de la coloration syntaxique.

1 réponse

Hadil6 Messages postés 9 Date d'inscription mardi 5 mai 2015 Statut Membre Dernière intervention 14 octobre 2015 1
5 mai 2015 à 15:31
Ca marche.. J'ai utilise <asp:Linkutton> au lieu du <asp:ImageButton>.
Mais je ne sais pas pour quelle raison "ImageButton.OnCommand" ne fonctionne pas sous Firefox !!

Merci bcp
0