Collapsible Panel Extender. Going Crazy. I need some feedback. Another Bug?

Discussion in 'ASP .Net' started by shapper, Jul 5, 2007.

  1. shapper

    shapper Guest

    Hello,

    I am having problems with Collapsible Panel Extender on my web site
    and always getting an error:

    Exception Details: System.ArgumentNullException: Value cannot be null.
    Parameter name: child

    Well, I tried everything to solve this and no success. Is this another
    AJAX Control Toolkit Bug?

    I created a sample page. Could someone please try it out and provide
    me some feedback on this?

    ASPX Code:

    <%@ Page Language="VB" AutoEventWireup="false"
    CodeFile="Default2.aspx.vb" Inherits="Default2" %>

    <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0,
    Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>

    <!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 runat="server">
    <title>Untitled Page</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:placeHolder ID="ph" runat="server"></asp:placeHolder>
    </form>
    </body>
    </html>


    ASPX VB:NET Code:

    Partial Class Default2
    Inherits System.Web.UI.Page

    Protected WithEvents cpeOptions As CollapsiblePanelExtender
    Protected WithEvents lHeader As New Label
    Protected WithEvents lOptions As New Label
    Protected WithEvents pHeader As New Panel
    Protected WithEvents pOptions As New Panel

    Protected Sub Page_Init(ByVal sender As Object, ByVal e As
    EventArgs) Handles Me.Init
    With ph.Controls
    .Add(pHeader)
    .Add(pOptions)
    .Add(cpeOptions)
    End With
    pHeader.Controls.Add(lHeader)
    pOptions.Controls.Add(lOptions)
    End Sub ' Page_Init

    Protected Sub cpeOptions_Init(ByVal sender As Object, ByVal e As
    EventArgs) Handles cpeOptions.Init

    With cpeOptions
    .CollapseControlID = "pOptions"
    .ExpandControlID = "pOptions"
    .ID = "cpeOptions"
    .TargetControlID = "pHeader"
    End With

    End Sub ' cpeOptions_Init

    Private Sub pHeader_Init(ByVal sender As Object, ByVal e As
    EventArgs) Handles pHeader.Init

    With pHeader
    .ID = "pHeader"
    .Width = Unit.Pixel(600)
    End With

    End Sub ' pHeader_Init

    Protected Sub pOptions_Init(ByVal sender As Object, ByVal e As
    EventArgs) Handles pOptions.Init

    With pOptions
    .ID = "pOptions"
    .Width = Unit.Pixel(600)
    End With

    End Sub ' pOptions_Init

    Private Sub lHeader_Init(ByVal sender As Object, ByVal e As
    EventArgs) Handles lHeader.Init

    ' Define lHeader properties
    With lHeader
    .ID = "lHeader"
    .Text = "Header Text"
    End With

    End Sub ' lHeader_Init

    Private Sub lOptions_Init(ByVal sender As Object, ByVal e As
    EventArgs) Handles lOptions.Init

    ' Define lOptions properties
    With lOptions
    .ID = "lOptions"
    .Text = "Options Panel Text. This is some sample text"
    End With

    End Sub ' lOptions_Init

    End Class

    Thanks,

    Miguel
    shapper, Jul 5, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. probashi
    Replies:
    2
    Views:
    624
    probashi
    Apr 9, 2007
  2. probashi
    Replies:
    1
    Views:
    920
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Apr 19, 2007
  3. Giorgio
    Replies:
    0
    Views:
    606
    Giorgio
    Jul 3, 2008
  4. David C

    Collapsible Panel Extender

    David C, Dec 13, 2009, in forum: ASP .Net
    Replies:
    3
    Views:
    2,307
    Nathan Sokalski
    Dec 14, 2009
  5. ColinRobinson

    collapsible panel?

    ColinRobinson, Nov 1, 2004, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    162
    Nick Stansbury
    Dec 16, 2004
Loading...

Share This Page