ajax accordion control broken in ajax 1.0

A

Andy B

I have a problem. I tried to do what the asp.net ajax video tutorials said
to do but keep getting major problems. I type the code below and get this
error:
Error Rendering Control - Accordion1
An unhandled exception has occurred.
Collection was modified; enumeration operation may not execute.
here is the code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>

<%@ Register Assembly="Microsoft.Web.Preview"
Namespace="Microsoft.Web.Preview.UI.Controls"
TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server"
/>

<ajaxToolkit:Accordion ID="Accordion1" runat="server">
<Panes>
<ajaxToolkit:AccordionPane ID="AccordionPane6" runat="server"
ContentCssClass=""
HeaderCssClass="">
<Header>
< a href="" onclick="return false;">News</a>
</Header>
<Content>
test
</Content>
</ajaxToolkit:AccordionPane>
<ajaxToolkit:AccordionPane ID="AccordionPane7" runat="server"
ContentCssClass=""
HeaderCssClass="">
<Header>
<a href="" onclick="return false;">Events</a>
</Header>
<Content>
testing again 2
</Content>
</ajaxToolkit:AccordionPane>
</Panes>
</ajaxToolkit:Accordion>

</form>
</body>
</html>
When I originally put the control on the page, it created an
AccordionExtender control and inserted it into the Accordion control. If I
compiled the code without doing anything else, I got the error: Accordion1
doesn't have a public property or method named Accordion_Extender. Oh, the
other problem, when originally putting the control on the page and adding
panes to it, it never put them in a <panes> block. Is there any way to get
this control to work right?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top