vuyiswamb 17 Posting Whiz

Good Day All

I have 20 Textboxes and when there are duplicates in those textboxes , i store them in a List<string> and on fly i build a CheckBoxList and display that as a modal and in that i have a close button to allow the user to correct the duplicate item. My Function is working and it is defined like this

private void ShowAjaxModalDynamic(List<string> lstItems, String Message)
          CheckBoxList lstchecks = new CheckBoxList();

					for (int i = 0; i < lstItems.Count; i++)
						lstchecks.Items.Add("Unit" + lstItems[i]);
          AjaxControlToolkit.ModalPopupExtender modalPop = new AjaxControlToolkit.ModalPopupExtender();
          modalPop.ID = "popUp";
          modalPop.PopupControlID = "ModalPanel"; //The Panel must exist on the markup
					modalPop.TargetControlID = "btnComplete"; //the Button must exist on the markup
          modalPop.DropShadow = true;
					modalPop.CancelControlID = "btnCancel"; //The Button must exist on the markup
          modalPop.BackgroundCssClass = "modalBackground";
					lblPanelMessage.Text = Message;


as you can see i will pass the List and the Message to be displayed. Now this is working Perfect.

My Problem is that when the user clicks the close Button to correct the duplicate in those textbox, and re-click the button that will check for Duplicate , the Modal comes back again even if the duplicate has been removed and the break point to the start part that does the validation does not get fired.

I have attached the Example Project , it is a .net 4 web project

Example Project

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.