Hi,
I am using two instances of a user control. But when I click on a button in the user control, both of the instances calls the function corresponding to the first event (AcknowledgeReceipt())
However, when I remove the first user control and clicks on the btnRequestClarification, it calls the correct method (RequestClarification())
Is there a way to correct this behavior?
acknowledgeModificationPopupCtrl = (ConfirmationPopup)this.LoadControl("~/ConfirmationPopup.ascx");
plHConfirmationPopup.Controls.Add(acknowledgeModificationPopupCtrl);
acknowledgeModificationPopupCtrl.ContinueClick += new EventHandler(AcknowledgeReceipt);
RequiredFieldValidator reqFValidatorAcknowledge = (RequiredFieldValidator)acknowledgeModificationPopupCtrl.FindControl("reqValidatorTxt");
reqFValidatorAcknowledge.ValidationGroup = "AcknowledgeReceipt";
acknowledgeModificationPopupCtrl.ValidationGroup = "AcknowledgeReceipt";
btnAcknowledgeReceipt.Attributes.Add("onclick", "validateconfirmPopup('true','xx' ,’yyy','Note' ,'true'); return false;");
requestModificationPopupCtrl = (ConfirmationPopup)this.LoadControl("~/ConfirmationPopup.ascx");
plHConfirmationPopup.Controls.Add(requestModificationPopupCtrl);
requestModificationPopupCtrl.ContinueClick += new EventHandler(RequestClarification);
RequiredFieldValidator reqFValidator = (RequiredFieldValidator)requestModificationPopupCtrl.FindControl("reqValidatorTxt");
reqFValidator.ValidationGroup = "request";
requestModificationPopupCtrl.ValidationGroup = "request";
btnRequestClarification.Attributes.Add("onclick", "validateconfirmPopup('true',’kkk' ,’lll','ff' ,'true'); return false;");
Thanks
Lijo