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 SuppressHeaders Postback 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 SuppressHeaderP ostback will create an accordion_exten der
control and insert it into the accordion control source. This results in an
error 'The control Accordion1 doesn't have a public property
'accordion_exte nder''. Moving the accordion_exten der control outside of the
accordion control results in a parse error: 'Only 1 control with the ID
'accordion_exte nder1' 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****@digiexp ress.com.brwrot e in message
news:ew******** ******@TK2MSFTN GP02.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...
<HeaderTemplate s>
<%#Eval("Title" )%>
</HeaderTemplates >
I gotta check it at home... but i think the Accordion creates the
open/close statements by itself...
"Andy B" <a_*****@sbcglo bal.netescreveu na mensagem
news:%2******** ********@TK2MSF TNGP04.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****@digiexp ress.com.brwrot e in message
news:O4******* *******@TK2MSFT NGP04.phx.gbl.. .
>><a href='<%#Eval(" FieldWithURL")% >'><%#Eval("Tit le")%></a>
you are not filling the url tag..
"Andy B" <a_*****@sbcglo bal.netescreveu na mensagem
news:%2****** **********@TK2M SFTNGP02.phx.gb l...
Can u post your accordion code? will be much clearer to figure out...
WebForm1.asp x accordion code:
<asp:ScriptM anager ID="ScriptManag er1" runat="server">
</asp:ScriptManag er>
<div>
<cc1:Accordi on ID="Accordion1 " runat="server" RequireOpenedPa ne="false"
SelectedInde x=0>
<HeaderTempl ate>
<a href=""><%#Eval ("Title")%></a>
</HeaderTemplate>
<ContentTemp late>
<%#Eval("Bod y")%>
</ContentTemplate >
</cc1:Accordion>
</div>
WebForm1.asp x.cs code for accordion:
Imports Test.eternityre cordsonlineEnti ties
Partial Public Class WebForm1
Inherits System.Web.UI.P age
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.Event Args) Handles Me.Load
Dim NewsContext As New eternityrecords onlineEntities( )
Accordion1.D ataSource = NewsContext.Get AllNews()
Accordion1.D ataBind()
End Sub
End Class