Hello!
There's no "User Controls" forum, and I'm not sure if Server Controls are the same thing, so I'm just assuming that this would be the forum to put User Control-related questions in.
So, I have a user control and a custom link button class with a property that uses the ViewState to store its data. I have about three of these on my control, and they've been working just fine. You click the link button and it updates the property. However, now I'm trying to nest the contents of my user control inside a div in itself. I created a private variable "parentControl," and changed all references to this.Controls.Add() to parentControl.Controls.Add(). The parentControl div is created in the OnInit event, while the linkbuttons are created and added in the Page_Load event if the IsPostBack property is false. Now, you have to click the link button twice to update the property. What is the problem here?
Thanks,
JC