|
-
Mar 4th, 2009, 05:25 PM
#1
Thread Starter
Hyperactive Member
[2008] AJAX CollapsiblePanelExtender
I am attempting to use the CollapsiblePanelExtender but for some reason it never expands or collapses.. Do I need some codebehind for this tool to work?
Code:
<%@ Page Language="C#" MasterPageFile="MasterPage.Master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default2" Title="Untitled Page" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="atk" %>
<asp:Content ID="cbody" runat="server" ContentPlaceHolderID="body">
<style type="text/css">
.cpBody
{
background-color: #DCE4F9;
font: normal 11px auto Verdana, Arial;
border: 1px gray;
width:450px;
height: 0px;
padding: 4px;
padding-top: 7px;
overflow:hidden;
}
</style>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="upLR" runat="server" >
<ContentTemplate>
<atk:CollapsiblePanelExtender
ID="cpe"
Runat="server"
TargetControlID="pBody"
CollapsedSize="0"
ExpandedSize="300"
Collapsed="True"
ExpandControlID="pHeader"
CollapseControlID="pHeader"
AutoCollapse="False"
AutoExpand="False"
ScrollContents="True"
TextLabelID="lblText"
CollapsedText="Show Details..."
ExpandedText="Hide Details"
ExpandDirection="Vertical" />
<asp:Panel ID="pHeader" runat="server">
<asp:Label ID="lblText" runat="server" Text="License Request" />
</asp:Panel>
<asp:Panel ID="pBody" runat="server" CssClass="cpBody">
<ul>
<li><a href="">Production</a></li>
<li><a href="">Pre-Production</a></li>
<li><a href="">Development</a></li>
</ul>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
-
Mar 4th, 2009, 05:47 PM
#2
Addicted Member
Re: [2008] AJAX CollapsiblePanelExtender
Does it throw any javascript errors when you click on it?
I also thought the script manager tag was supposed to be at the top of the page?
Oh, you're using a Masterpage. I'm afraid I'll be of little help in that area.
If my post helped you, please rate it!
Languages: VB/ASP.NET 2005, C# 2008,VB6
Databases: Oracle (knowledge not currently in use), DB2
FROM Customers
WHERE We_Know_What_We_Want <> DB.Null
SELECT *
0 rows returned
-
Mar 5th, 2009, 03:26 AM
#3
Re: [2008] AJAX CollapsiblePanelExtender
Do you have the ToolKitScriptManager on the masterpage ?
-
Mar 5th, 2009, 10:07 AM
#4
Re: [2008] AJAX CollapsiblePanelExtender
I hate that control. The jQuery slideToggle method is muuuuuuch smoother, easier to implement, and generates a lot less code, not to mention has a faster load time as there's no server control to be rendered. However, things I notice about your control definition:
AutoCollapse and AutoExpand are two properties I've never used... you don't need them.
ExpandedSize and CollapsedSize - also not needed. Use CSS to make the panel look like what you want, then set Collapsed=True. It knows that with nothing specified, Collapsed = not visible.
See if pulling those properties fixes anything.
-
Mar 5th, 2009, 02:11 PM
#5
Thread Starter
Hyperactive Member
Re: [2008] AJAX CollapsiblePanelExtender
I've tried putting the ToolKitScriptManager on both the default.aspx page and the masterpage, neither has worked. I don't even see the Expanded or Collapsed text appearing..
-
Mar 5th, 2009, 02:23 PM
#6
Re: [2008] AJAX CollapsiblePanelExtender
Did you try removing those extra properties that you don't need?
-
Mar 5th, 2009, 02:48 PM
#7
Thread Starter
Hyperactive Member
Re: [2008] AJAX CollapsiblePanelExtender
Yes I have removed the fields you suggested to remove... also note the collapsed property is set to true and the CSS is defined at the stop of the page
no text ever shows up on lblText and the panel pBody is always expanded
-
Mar 5th, 2009, 02:55 PM
#8
Re: [2008] AJAX CollapsiblePanelExtender
OK, this is going to sound crazy... try changing the TagPrefix of the Toolkit to "ajaxToolkit". I just recalled having a similar issue with the Toolkit where something that appeared syntactically correct just wasn't working, and using the default tag prefix fixed it for me... don't ask me why. Maybe you're just having the same issue.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|