hello ,   few days ago , i was converting some codes from VB to C# , and the project was about making dynamic WebUserControl , when click event happened by add button and postback happens , most of my code is okay , and its run the page and i can create dynamic pages , but the problem face me , the delete method , here is this part of my code
 
public void HandleRemoveUserControl(object sender, EventArgs e) // 'This handles delete event fired from the user control { //'Get the user control that fired this event, and remove it Button but = sender as Button; WebUserControl DynamicUserControl = (WebUserControl)but.Parent; ph1.Controls.Remove(DynamicUserControl); /*'Keep a pipe delimited list of which user controls 'were removed. This will increase the 'viewstate size if the user keeps removing 'dynamic controls, but under normal use 't ...

Go to the complete details ...