This is now fixed. I had to do the following to get it to work:
1. In the HeaderTemplate, use a # for the url of the link. This is a code
telling the accordion control to open/close the pannels.
2. Set the SuppressHeadersPostback property to true. This stops the page
from reloading all the time.
There is still a bug in the control where setting some properties like
RequireOpenPane and SuppressHeaderPostback will create an accordion_extender
control and insert it into the accordion control source. This results in an
error 'The control Accordion1 doesn't have a public property
'accordion_extender''. Moving the accordion_extender control outside of the
accordion control results in a parse error: 'Only 1 control with the ID
'accordion_extender1' can exist on the page at a time...'. Totally deleting
the extender from the aspx source fixes the problems with the "extender
properties". I think this is a bug and should be fixed somehow.
"Christiano Donke" <cd****@digiexpress.com.brwrote in message
news:ew**************@TK2MSFTNGP02.phx.gbl...
hhmm i think i got it...
maybe <a href="#">blah</a>, but it will reload the page...
try to do it without the link... just plain text...
<HeaderTemplates>
<%#Eval("Title")%>
</HeaderTemplates>
I gotta check it at home... but i think the Accordion creates the
open/close statements by itself...
"Andy B" <a_*****@sbcglobal.netescreveu na mensagem
news:%2****************@TK2MSFTNGP04.phx.gbl...
>Yea I know. I don't want this to load a new page, I just want it to
open/close the content of the pannel. The old versions of the control
have <a href="">blah</afor opening/closing the pannel. What kind of URl
would I put in the href= section if the entire control is bound to a
resultset from a database? More direction would be helpful here.
"Christiano Donke" <cd****@digiexpress.com.brwrote in message
news:O4**************@TK2MSFTNGP04.phx.gbl...
>><a href='<%#Eval("FieldWithURL")%>'><%#Eval("Title")% ></a>
you are not filling the url tag..
"Andy B" <a_*****@sbcglobal.netescreveu na mensagem
news:%2****************@TK2MSFTNGP02.phx.gbl.. .
Can u post your accordion code? will be much clearer to figure out...
WebForm1.aspx accordion code:
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<cc1:Accordion ID="Accordion1" runat="server" RequireOpenedPane="false"
SelectedIndex=0>
<HeaderTemplate>
<a href=""><%#Eval("Title")%></a>
</HeaderTemplate>
<ContentTemplate>
<%#Eval("Body")%>
</ContentTemplate>
</cc1:Accordion>
</div>
WebForm1.aspx.cs code for accordion:
Imports Test.eternityrecordsonlineEntities
Partial Public Class WebForm1
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim NewsContext As New eternityrecordsonlineEntities()
Accordion1.DataSource = NewsContext.GetAllNews()
Accordion1.DataBind()
End Sub
End Class