Author: NUStudent | Posted on: 6/14/2010 5:11:23 PM | Views : 263

I have an .aspx form that has a place holder that allows a user to add controls on button click.  Upon button click of "Remove last added control" the user will see the last control be removed.  I have searched this and can capture the control that they are wanting to delete but am having trouble actually removing the darn thing!!
Here is my code that I have that iterates through the controls and finds the specific ID that i want to delete but does not seem to delete it due to my syntax I believe (Coded in C# in .Net envirnomnet).
foreach (Control c in myPlaceHolder.Controls)
            {
                if (c.ID == "myTextBox" + Convert.ToString(Session["Control_Count"]))
                {
   & ...

Go to the complete details ...