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

S

shapper

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top