I have a content page that is based on a master page. I am trying to use an accordion control on it and am getting no where.
If I cut and paste the accordion code from my master page derived content page and put it in a NON-master page derived page. It works great.
What am I missing? By the way, I am not using a script proxy because I don't have a script manager on the master page. Don't know if that matters, but ... Below is the code.
More information. I was able to isolate the problems to the fact that there's a master page involved. If I take the simplest masterpage and add a content page with nothing but the simplest accordion with 2 panes, it does not work properly. If I take it off
the master page and just have html, it works great.
Here is the code for both.
First as html which works, then the content page and master page which doesn't. There is no code behind code in any case.
CatamaranMan
Member
33 Points
48 Posts
Content Page based on master page accordion pain
Oct 31, 2006 10:43 AM|LINK
Hey all,
I have a content page that is based on a master page. I am trying to use an accordion control on it and am getting no where.
If I cut and paste the accordion code from my master page derived content page and put it in a NON-master page derived page. It works great.
What am I missing? By the way, I am not using a script proxy because I don't have a script manager on the master page. Don't know if that matters, but ... Below is the code.
Thanks ... Ed
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="ExpenseSpreader.aspx.vb" Inherits="Admin_ExpenseSpreader" title="Envision Accounting - Expense Spreader" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderContent" Runat="Server">
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<ajaxToolkit:Accordion id="Accordion1" runat="server" FadeTransitions=True SelectedIndex=0
HeaderCssClass="accordionHeader" ContentCssClass="accordionContent" AutoSize=none >
<Panes>
<ajaxToolkit:AccordionPane ID="AccordionPane1" runat="server" ContentCssClass="" HeaderCssClass="">
<Header>
<a href="" onclick="return false;" class="accordionLink">Professional Expenses</a>
</Header>
<Content>
This is Professional Expenses
</Content>
</ajaxToolkit:AccordionPane>
<ajaxToolkit:AccordionPane ID="AccordionPane2" runat="server" ContentCssClass="" HeaderCssClass="">
<Header>
<a href="" onclick="return false;" class="accordionLink">Other Expenses</a>
</Header>
<Content>
This is Other Expenses
</Content>
</ajaxToolkit:AccordionPane>
</Panes>
</ajaxToolkit:Accordion>
</div>
</asp:Content>
CatamaranMan
Member
33 Points
48 Posts
Re: Content Page based on master page accordion pain
Oct 31, 2006 12:05 PM|LINK
More information. I was able to isolate the problems to the fact that there's a master page involved. If I take the simplest masterpage and add a content page with nothing but the simplest accordion with 2 panes, it does not work properly. If I take it off the master page and just have html, it works great.
Here is the code for both.
First as html which works, then the content page and master page which doesn't. There is no code behind code in any case.
Thanks ... Ed
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ExpenseSpreader.aspx.vb" Inherits="Admin_ExpenseSpreader" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>
<ajaxToolkit:Accordion ID="Accordion1" runat="server" FadeTransitions="false" FramesPerSecond="40" TransitionDuration="250" AutoSize="None">
<Panes>
<ajaxToolkit:AccordionPane ID="p1" runat=server >
<Header>
<a href="" onclick="return false;" >Pane1</a>
</Header>
<Content>
Content 1
</Content>
</ajaxToolkit:AccordionPane>
<ajaxToolkit:AccordionPane ID="p2" runat=server >
<Header>
<a href="" onclick="return false;" >Pane 2</a>
</Header>
<Content>
Content 2
</Content>
</ajaxToolkit:AccordionPane>
</Panes>
</ajaxToolkit:Accordion>
</div>
</form>
</body>
</html>
////////////////////////////
Here it is as a content page
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="ExpenseSpreader.aspx.vb" Inherits="Admin_ExpenseSpreader" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderContent" Runat="Server">
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>
<ajaxToolkit:Accordion ID="Accordion1" runat="server" FadeTransitions="false" FramesPerSecond="40" TransitionDuration="250" AutoSize="None">
<Panes>
<ajaxToolkit:AccordionPane ID="p1" runat=server >
<Header>
<a href="" onclick="return false;" >Pane1</a>
</Header>
<Content>
Content 1
</Content>
</ajaxToolkit:AccordionPane>
<ajaxToolkit:AccordionPane ID="p2" runat=server >
<Header>
<a href="" onclick="return false;" >Pane 2</a>
</Header>
<Content>
Content 2
</Content>
</ajaxToolkit:AccordionPane>
</Panes>
</ajaxToolkit:Accordion>
</asp:Content>
/////////////////////////
Here is the master page.
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Envision Accounting</title>
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body id="MasterBody" runat=server style="margin:0; top:0;">
<form id="form1" runat="server">
<div class="content">
<asp:ContentPlaceHolder ID="ContentPlaceHolderContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>