(I am using all the latest updates - completely removed everything I had and downloaded fresh stuff on November 7th)
If I try an make any changes to a control that is contained inside an Accordion Pane on execution of Page_Load I get the following error:
Object reference not set to an instance of an object.
The controls inside the Accordion Pane are fine if I don't do anything with them at Page_Load - Any events after this (such as button clicks, index changes etc) work fine.
To simplify things I have modified the Accordion sample that comes as part of the sample web site
To the first Accordion Pane I have added just a text box:
<ajaxToolkit:AccordionPane ID="AccordionPane1" runat="server">
<Header><a href="" onclick="return false;" class="accordionLink">1. Accordion</a></Header>
<Content>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
The Accordion is a web control that allows you to provide multiple panes and display them one at a time.
It is like having several
<asp:HyperLink ID="CPLink1" runat="server" NavigateUrl="~/CollapsiblePanel/CollapsiblePanel.aspx" Text="CollapsiblePanels" /> where
only one can be expanded at a time. The Accordion is implemented as a web control that contains AccordionPane
web controls. Each AccordionPane control has a template for its Header and its Content. We keep track of the
selected pane so it stays visible across postbacks.
</Content>
</ajaxToolkit:AccordionPane>
And Page_Load is modified thus:
protected void Page_Load(object sender, EventArgs e)
{
TextBox1.Text = "test";
}
If I was to comment this Page_Load bit, the Accordion works fine and the text box appears OK:
If someone can confirm that this is a bug in the Accordion, then I can work around for the time being (I won't initialise at Page_Load), I will continue development and resolve in a later release.
Alternatively, if this is for some reason by design, then I'll need to reconsider the way I am using the page and what controls I use as I ultimately need this at page load - but I am sure it is a bug as the control is on the page and should be visible to the Page Load event
Thanks for lookin!