Bonjour,

J'utilsie xslt pour générer ma page html.
Dans mon code xsl, je créer des images input
<input type="image" name="..." title="...." src="...." border="0" />
Je souhaiterais associer un évènement à chaque image directement à partir du xsl.

A partir du code C# cela aurait été du genre :

ImageButton img = ...
Img.Command += new CommandEventHandler(img_Command) ;

Merci pour votre aide.

Voici mon code :

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
 
public class WebForm1 : System.Web.UI.Page
{
    ...
    protected System.Web.UI.WebControls.Xml XmlRapport;
 
 
    private void Page_Load(object sender, System.EventArgs e)
   {
               XmlDocument document = new XmlDocument() ; 
               ....
               XslTransform xslt = new XslTransform() ; 
               ....
 
                XmlRapport.Document = document ;		XmlRapport.Transform = xslt ;
   }
 ....
  private void img_Command( object sender, CommandEventArgs e )
 {
    ......
 }
}