Posted on: 5/14/2011 4:04:55 AM | Views : 313

i have alot of posts in this forum , but get no help
i have piece of code i convert it from VB to C# , but still something wrong
 
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 UserControl DynamicUserControl = sender.parent; ph1.Controls.Remove(sender.parent); //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 //this is such a small increase in size that it shouldn't be an issue. ltlRemoved.Text += DynamicUserControl.ID + "|"; //Also, now that we've removed a user control decrement //the count of total user controls on the page ltlCount.Text = ...

Go to the complete details ...