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";
          this.Panel1.Controls.Add(modalPop);
          this.ModalPanel.Controls.Add(lstchecks);
					lblPanelMessage.Text = Message;
					modalPop.Show();

		}

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

www.vuyiswamaseko.com/ExampleProblem/ExampleProblem.zip

Be a part of the DaniWeb community

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