je n'ai mi que la partie du code qui ne marche pas c'est à dire l'événement click du bouton
btUpload tt ceci se trouve dans un composant personnalisé .

Quand je le met dans un webform et quand je clique sur le bouton rien ne se passe
l'événement "click" n'est pas intercepter par mon composant.

Code:

'//////////////////////////////////////
' Upload le fichier sur le server
'//////////////////////////////////////
'
Sub btUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) 'Handles btUpload.ServerClick

Dim cheminAppli As String = Page.Request.PhysicalPath
Dim nomPage As String = Path.GetFileName(Page.Request.PhysicalPath)
Dim lng As Integer = cheminAppli.Length - nomPage.Length
cheminAppli = Left(cheminAppli, lng)
cheminAppli &= strDossierUpload

Dim fichier As String

If Not (InputFile.PostedFile Is Nothing) Then
Try

Dim postedFile = InputFile.PostedFile
Dim filename As String = Path.GetFileName(postedFile.FileName)
Dim contentType As String = postedFile.ContentType
Dim contentLength As Integer = postedFile.ContentLength
fichier = cheminAppli & "\" & filename
postedFile.SaveAs(fichier)

Catch exc As Exception

LbErreur.Text = "Failed uploading file"

End Try

End If

End Sub

'////////////////////////////////////////////////
' Initialise les controles du composant
'////////////////////////////////////////////////
'
Protected Overrides Sub CreateChildControls()

'Initialise btUpload
btUpload.ID = "btUpload"
btUpload.Value = "btUpload" 'Upload
btUpload.Attributes.Add("runat", "server")
btUpload.Visible = True
btUpload.EnableViewState = True

'Partie du code qui devrait justement faire marcher le clique

AddHandler btUpload.ServerClick, AddressOf btUpload_Click

Controls.Add(btUpload)

'Initialise InputFile
InputFile.ID = "uploadedFile"
InputFile.EnableViewState = True
InputFile.Name = "uploadedFile"

Controls.Add(InputFile)

End Sub