Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
I am trying to add an accordion control to one of my pages.
Following is the code:
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">

<cc1:Accordion ID="Accordion1" runat="server">
<panes>
<cc1:AccordionPane ID="AccordionPane1" runat="server">



</form>

but I am getting this error:
An unhandled exeception has occurred.
Collection was modified; enumeration operation may not execute

Searched on this error but no results seemed to pertain to my problem. Can someone tell me what I have done wrong?

Thanks
Lonnie

Posted

You seem to be missing <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit">.

Also, make sure you've included the AjaxControlToolkit's DLL in your project. You can also check out
Link for some tips on fixing AJAX problems

Hope this may help u... :)
 
Share this answer
 
Add CSS class for accordion header and content.

then error will dissapear.....
:) :) :)

 
Share this answer
 
make sure you've included the SelectedIndex="0" property of <cc1:Accordion ID="Accordion1" runat="server">
and in accordian tag we should have implemented at least 3 properties along with id , runat properties

Hope this may help u...
 
Share this answer
 
v2


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900