bonjour,
j'ai crée un control server.
Que j'integre sans probleme dans ma page.
Cependant je veux maintenant l'integrer dans ma page en dynamique du coté behind.
Dans ma page aspx, j'ai fait un register... de mon compsant (comme d'hab)
dans mon behind, j'ai fait import :
using Classes.WebControls;
puis dans mon code :
Le proble est que m'a derniere instruction provoque une exception car dans mon usercontrol j'ai :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 ConfirmDialogBox cmdConfirmation; cmdConfirmation = new ConfirmDialogBox(); cmdConfirmation.ID = cmdSupprime.ID + "confirm"; cmdConfirmation.TargetControlID = cmdSupprime.ID;
Et l'exception se crée car this.ConfirmButtonExtender2 est null ainsi this.ModalPopupExtender1.
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 [Bindable(true)] [DefaultValue("")] public string TargetControlID { get { return GetPropertyValue("TargetControlID", ""); } set { SetPropertyValue("TargetControlID", value); this.ConfirmButtonExtender2.TargetControlID = value; this.ModalPopupExtender1.TargetControlID = value; }
Je ne comprend pas pourquoi ?? (ils sont presents dans mon ascx)
Un peu d'aide help....
Partager