473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Ajax Enabled Web site -C# :Problem in creating dynamic Accordion

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();
AccordionPane aPane = new AccordionPane();
aPane.Width=300;
aPane.HeaderContainer.Controls.Add(new LiteralControl("Dyanamic Accordiaon"));
aPane.ContentContainer.Controls.Add(new LiteralControl("jdfh"));
aCC.Panes.Add(aPane);
AccordionPane aPane1 = new AccordionPane();
aPane1.Width = 300;
aPane1.HeaderContainer.Controls.Add(new LiteralControl("Collapse"));
aPane1.ContentContainer.Controls.Add(new LiteralControl("jdfgdth"));
aCC.Panes.Add(aPane1);
aCC.Visible = true;
}
catch(Exception e1)
{
Response.Write(e1);

}


}

But Accordion is not visible and also no errors
when i created Accordion in designing & iam adding AccordionPanes to that Accordion then it is working quite good.
Please any one solve it
Why i need to create dynamically is that iam using the control in gridview.
if the gridview is having more records then to load the grid it takes more time.
Jul 11 '07 #1
3 3405
Hey
I think you should add the accordion control to the form

try:
form.Controls.Add(MyAccordion);

This should do it.
Jul 16 '07 #2
Hey
I think you should add the accordion control to the form

try:
form.Controls.Add(MyAccordion);

This should do it.
Hi
Thanks for your reply
I used it before
while Iam adding like that it is throughing run time exception
TargetControlId is a invalid for Accordion POPup...

Thanks& Regards
Srilakshmi
Jul 16 '07 #3
Hi
Thanks for your reply
I used it before
while Iam adding like that it is throughing run time exception
TargetControlId is a invalid for Accordion POPup...

Thanks& Regards
Srilakshmi
Hi
I am sorry. I didnt quite get you.
We dont need to set targetcontrolid for the accordion.

Can you post your code, may be that can help.

Thanks.
Jul 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along...
2
by: Igor | last post by:
I just instaled AJAX framework. I can use it if I chose AJAX enabled aplication when I am creating new project. But I have some web aplication with no AJAX and I need to include it. It is not...
7
by: =?Utf-8?B?V2FubmFiZQ==?= | last post by:
We are looking at Ajaxing our existing web application. Question is...Should we Ajax any and everything we can, or not? One example...if a page posts back to itself, is that a good candidate for...
1
by: jrcapp | last post by:
Let's see if I can clearly explain what I am doing with AJAX. On my Web site, I have a TabContainer that has 2 TabPanels. Inside each Panel, I am dynamically (using a SQL query) creating an...
4
by: ameshkin | last post by:
Hi Everybody, I'm just now learning javascript and I'm using mootools. What I want to do is to dynamically load a php page into accordian panel 2, depending on which radio button is selected in...
8
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....
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
1
by: E11esar | last post by:
Hi there. I have created an asp.net page with C# and have added two tabs using the respective AJAX control. I am trying to add a table within an AJAX Accordion control in the second tab but I am...
8
by: quipo | last post by:
Hi, im using an accordion script but it doesnt work if i use it with ajax. example: <div id="accordion"> <dl class="accordion" id="slider"> <dt>click here for the 1st pane</dt> ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...
0
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...

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.