Hi Brad,
Thanks for your followup. I've done a simple test on my side. Creating a
webcontrol which applys the
"ParseChildren(false)" and "PersistChildren(true)", but seems the
LoadViewState and SaveViewState override methods still be entered. Here is
the test control's code, you may also have a try to see whether the result
on your side is the same, if so , I think we should focus on the particular
control which suffering the problem:
=====================
[DefaultProperty("Text"), ParseChildren(false), PersistChildren(true),
ToolboxData("<{0}:SimplePanel runat=server></{0}:SimplePanel>")]
public class SimplePanel :
System.Web.UI.WebControls.WebControl,INamingContainer
{
private string text;
private string _controlname;
public string ControlName
{
get
{
return _controlname;
}
set
{
_controlname = value;
}
}
[Bindable(true),
Category("Appearance"),
DefaultValue("")]
public string Text
{
get
{
return text;
}
set
{
text = value;
}
}
protected override void LoadViewState(object savedState)
{
Triplet tpt = savedState as Triplet;
_controlname = tpt.First as string;
base.LoadViewState (tpt.Second);
}
protected override object SaveViewState()
{
Triplet tpt = new Triplet(_controlname,base.SaveViewState ());
return tpt;
}
protected override void Render(HtmlTextWriter writer)
{
base.Render (writer);
writer.WriteLine("<br>ControlName: " + this.ControlName);
}
}
======================
If you have any other questions or finding, please also feel free to post
here. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no
rights.)