473,756 Members | 2,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accordion control for .net 3.5 sp1 is broken?

I am trying to use an accordion control from the ajax control toolkit for
..net3.5 sp1. When I put a link in one of the accordion pannel
headerTemplates to open and close the content, I always get an "index of /"
page that shows the files and folders in the folder the current page is in.
The link looks like this: <a href="">Open/close test</aAny idea why this
happens and how to fix it?

Nov 13 '08 #1
6 2178
Can u post your accordion code?
will be much clearer to figure out...

tks..
"Andy B" <a_*****@sbcglo bal.netescreveu na mensagem
news:%2******** *******@TK2MSFT NGP06.phx.gbl.. .
>I am trying to use an accordion control from the ajax control toolkit for
.net3.5 sp1. When I put a link in one of the accordion pannel
headerTemplate s to open and close the content, I always get an "index of /"
page that shows the files and folders in the folder the current page is in.
The link looks like this: <a href="">Open/close test</aAny idea why this
happens and how to fix it?

Nov 13 '08 #2
Can u post your accordion code? will be much clearer to figure out...
WebForm1.aspx accordion code:
<asp:ScriptMana ger ID="ScriptManag er1" runat="server">

</asp:ScriptManag er>

<div>

<cc1:Accordio n ID="Accordion1 " runat="server" RequireOpenedPa ne="false"
SelectedIndex=0 >

<HeaderTemplate >

<a href=""><%#Eval ("Title")%></a>

</HeaderTemplate>

<ContentTemplat e>

<%#Eval("Body") %>

</ContentTemplate >

</cc1:Accordion>

</div>

WebForm1.aspx.c s 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.EventArg s)
Handles Me.Load

Dim NewsContext As New eternityrecords onlineEntities( )

Accordion1.Data Source = NewsContext.Get AllNews()

Accordion1.Data Bind()

End Sub

End Class
Nov 13 '08 #3
<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******** ********@TK2MSF TNGP02.phx.gbl. ..
>Can u post your accordion code? will be much clearer to figure out...
WebForm1.aspx accordion code:
<asp:ScriptMana ger ID="ScriptManag er1" runat="server">

</asp:ScriptManag er>

<div>

<cc1:Accordio n ID="Accordion1 " runat="server" RequireOpenedPa ne="false"
SelectedIndex=0 >

<HeaderTemplate >

<a href=""><%#Eval ("Title")%></a>

</HeaderTemplate>

<ContentTemplat e>

<%#Eval("Body") %>

</ContentTemplate >

</cc1:Accordion>

</div>

WebForm1.aspx.c s 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.EventArg s) Handles Me.Load

Dim NewsContext As New eternityrecords onlineEntities( )

Accordion1.Data Source = NewsContext.Get AllNews()

Accordion1.Data Bind()

End Sub

End Class


Nov 13 '08 #4
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******** ******@TK2MSFTN GP04.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******** ********@TK2MSF TNGP02.phx.gbl. ..
>>Can u post your accordion code? will be much clearer to figure out...
WebForm1.asp x accordion code:
<asp:ScriptMan ager ID="ScriptManag er1" runat="server">

</asp:ScriptManag er>

<div>

<cc1:Accordi on ID="Accordion1 " runat="server" RequireOpenedPa ne="false"
SelectedIndex= 0>

<HeaderTemplat e>

<a href=""><%#Eval ("Title")%></a>

</HeaderTemplate>

<ContentTempla te>

<%#Eval("Body" )%>

</ContentTemplate >

</cc1:Accordion>

</div>

WebForm1.aspx. 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.EventAr gs) Handles Me.Load

Dim NewsContext As New eternityrecords onlineEntities( )

Accordion1.Dat aSource = NewsContext.Get AllNews()

Accordion1.Dat aBind()

End Sub

End Class



Nov 13 '08 #5
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******** ******@TK2MSFTN GP04.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******* *********@TK2MS FTNGP02.phx.gbl ...
>>>Can u post your accordion code? will be much clearer to figure out...
WebForm1.as px accordion code:
<asp:ScriptMa nager ID="ScriptManag er1" runat="server">

</asp:ScriptManag er>

<div>

<cc1:Accordio n ID="Accordion1 " runat="server" RequireOpenedPa ne="false"
SelectedIndex =0>

<HeaderTempla te>

<a href=""><%#Eval ("Title")%></a>

</HeaderTemplate>

<ContentTempl ate>

<%#Eval("Body ")%>

</ContentTemplate >

</cc1:Accordion>

</div>

WebForm1.aspx .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.EventA rgs) Handles Me.Load

Dim NewsContext As New eternityrecords onlineEntities( )

Accordion1.Da taSource = NewsContext.Get AllNews()

Accordion1.Da taBind()

End Sub

End Class




Nov 13 '08 #6
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




Nov 13 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3308
by: noneya22 | last post by:
I have an accordion control with a dynamically generated asp.net checkbox server-side control in each accordion pane. On postback I loop through all of the controls on the page, and I never find one that is of type checkbox. If I get rid of the accordion control, the same code works fine. I tried looping through the request object in search of client-side checkboxes, but this failed too. Are there any known issues with the accordion...
3
3435
by: srilakshmim | last post by:
Hello I want to create Accordion (Ajax Control Tool Kit)dynamically. My Code is as follows Code: ( cpp ) protected void Page_Load(object sender, EventArgs e) { try { Accordion aCC = new Accordion();
1
7125
by: anjali.lourda | last post by:
Hi, We are trying to use the accordion control from ajaxcontroltoolkit by databinding to an sqldatasource. The accordion binds to the datasource perfectly. However, We are not able to access the controls or their values which were bound. Please let me know which is the away to access that Given below is the code. Please let me know if any further information is required. Regards, Anjali
0
4451
by: axxon | last post by:
hi, I am having a huge problem here! the scenario is i am trying to create dynamic accordion Panes to a accordion control inside a tab panel in a content page. It works just fine in a regular webform page which does not use a master page. but if i try to add dynamic accordion panes to a accordion inside a tab panel, it stops working. but I hav tested i can use static accordion panes jsut fine. here is my code: //////////// tab...
0
1868
by: rcon | last post by:
I'm creating a user control to prompt for crystal reports parameters. The individual controls work fine, and the over all control works fine too. However, I'm not really that experienced in the use of dynamic controls and am having some issues with getting the accordion to work properly. What happens when one of my user controls fires a postback is that the accordion gets set back to the first pane. I suspect that this is happening...
1
3566
by: David Lazos | last post by:
Hi, I'm using the HeaderTemplate and the ContentTemplate of the Accordion control and binding it to a DataTable. But it doesn't display any data. If i bind the same datatable to a datalist it works well as expected. Are there any tricks for Accordion Control ? the .aspx code ; **************** <cc1:Accordion ID="Accordion1" runat="server" FadeTransitions="True"
8
2738
by: Tomasz J | last post by:
Hello developers, After migrating my web project application (using the old model) to .Net Framework 3.5 and Ajax Control Toolkit release 20820 the Accordion control no longer works correctly. In certain cases (only) it renders but is dead - does not initialize. Before the migration it worked, no changes have been made. Here is the complete scenario description:
3
5275
by: Allen Chen [MSFT] | last post by:
Hi Richard, Quote from Richard================================================== However I also want to be able to remove the panes. I have tried to include this, but find that when I first add the pane the remove event does not get handled, though thereafter it is handled without problems. ==================================================
0
1142
by: Andy B | last post by:
I am using an accordion for some different views. The datasource for the one below is hooked up to a entity framework datacontext function import and works just fine. The problem is I can't close/open the different panes in it. I always end up getting a "directory listing" instead. Any ideas how to fix this? Here is the markup for it: <cc1:Accordion ID="Accordion1" runat="server" RequireOpenedPane="false" SelectedIndex=0> ...
0
9462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9287
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9886
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9857
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9722
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7259
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6542
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.