ImageButton et validation formulaire
Bonjour,
j'ai un souci avec un ImageButton.
Habituellement, je valide un formulaire avec ce contrôle, mais là, je suis sur un nouveau site web et je m'arrache les cheveux depuis un moment, un truc qui habituellement fonctionne niquel, là je ne sais pas pourquoi, ça ne veut pas me valider le formulaire :
=> Au lieu d'envoyer à la page suivante indiqué dans mon bouton, ça me recharge en postback la même page.
J'ai fais un test sur mon site avec une page vierge et juste le code de mon bouton et ça fait pareil. Voici mon code pour infos :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/VALIDER.jpg"
PostBackUrl="resultat.aspx" CausesValidation="true" ToolTip="Valider les informations de cette page.." />
</div>
</form>
</body>
</html> |
et mon code behind :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Imports System
Imports System.Data
Imports System.IO
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports System.Data.OleDb
Imports System.Data.SqlClient
Partial Class Essais4
Inherits System.Web.UI.Page
End Class |
Je ne vois ps d'où peut venir mon problème ? :roll:
Faut-il configurer un truc quelque part ?