I am trying to add a table within an AJAX Accordion control in the second tab but I am running into problems where the two accordian entries are not functioning correctly. If I don't use a table and just place some sample text within the accordian body then this works okay but once I add the table, the second accordion value appears on the first tab page and the links in the second tab (and hence the accordion) do not respond.
Here is the code so far:
Expand|Select|Wrap|Line Numbers
- <%@ Page Title="Address Search" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
- <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
- <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
- </asp:Content>
- <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
- <cc1:ToolkitScriptManager ID="ScriptManager1" runat="server" />
- <cc1:TabContainer ID="TabContainer1" runat="server">
- <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Address Search">
- <ContentTemplate><br />
- <table align="center">
- <b>Address Details:</b>
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td><asp:Label ID="Label1" runat="server" Text="House No:"></asp:Label></td>
- <td><asp:TextBox ID="txtNumber" runat="server" Width="140px"></asp:TextBox></td>
- </tr>
- <tr>
- <td><asp:Label ID="Label2" runat="server" Text="Street:"></asp:Label></td>
- <td><asp:TextBox ID="txtStreet" runat="server" Width="380px"></asp:TextBox></td>
- </tr>
- <tr>
- <td><asp:Label ID="Label5" runat="server" Text="Post Code:"></asp:Label></td>
- <td><asp:TextBox ID="txtPostCode" runat="server" Width="140px"></asp:TextBox></td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td><b>Select run type:</b></td>
- <td><asp:Label ID="lblNLPG" runat="server" Text="NLPG"></asp:Label>
- <asp:CheckBox ID="cbNLPG" runat="server" />
- <asp:Label ID="lblLLPG" runat="server" Text="LLPG"></asp:Label>
- <asp:CheckBox ID="cbLLPG" runat="server" />
- </td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td><asp:Label ID="Label7" runat="server" Text="Get Address Details"></asp:Label></td>
- <td><asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="Search" /></td>
- </tr>
- <tr><td> </td>
- </tr>
- <tr>
- <td>Results:</td>
- <td><asp:ListBox ID="lbResults" runat="server" Height="134px" Width="380px"></asp:ListBox></td>
- </tr></caption>
- </table><br />
- <table align="center">
- <tr>
- <td><asp:Label ID="lblTime" runat="server" Text="Elapsed time:" Visible="False"></asp:Label></td>
- <td><asp:TextBox ID="txtTime" runat="server" Width="50px" Visible="False"></asp:TextBox></td>
- </tr>
- </table>
- </ContentTemplate>
- </cc1:TabPanel>
- <cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="LLP Extract">
- <ContentTemplate>
- <table align="center">
- <cc1:Accordion ID="Accordion1" runat="server" SelectedIndex="0" FadeTransitions="true" FramesPerSecond="40" TransitionDuration="250" AutoSize="None"
- HeaderCssClass="accordionHeader" HeaderSelectedCssClass="accordionHeaderSelected"
- ContentCssClass="accordionContent">
- <Panes>
- <cc1:AccordionPane ID="AccordionPane1" runat="server">
- <Header>
- <a href="" onclick="return false;" style="color: #C0C0C0">Parameters</a>
- </Header>
- <Content>
- <table>
- <tr>
- <td>
- Some Data 1
- </td>
- </tr>
- </table>
- </Content>
- </cc1:AccordionPane>
- <cc1:AccordionPane ID="AccordionPane2" runat="server">
- <Header>
- <a href="" onclick="return false;" style="color: #C0C0C0">Results</a>
- </Header>
- <Content>
- Some data 2
- </Content>
- </cc1:AccordionPane>
- </Panes>
- </cc1:Accordion>
- </table>
- </ContentTemplate>
- </cc1:TabPanel>
- </cc1:TabContainer>
- </asp:Content>
Thank you.
M :)