Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Amit 6 posts 26 karma points
    May 14, 2013 @ 13:11
    Amit
    0

    Error in multiple Panes under a single Tab control

    Hi All,

    I am trying to add multiple Panes under a single Tab control for my custom section
    But its showing the following error

    Server Error in '/' Application.

    Value cannot be null.
    Parameter name: child

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [ArgumentNullException: Value cannot be null.
    Parameter name: child]
       System.Web.UI.ControlCollection.Add(Control child) +9601355
       CustomUmbracoSection.test1.OnInit(EventArgs e) +191
       System.Web.UI.Control.InitRecursive(Control namingContainer) +134
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +489
    



    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929



    And my code some what looks like this

                        <cc1:Pane ID="Pane1" runat="server" Height="600px" Width="330px">
                            <cc1:PropertyPanel runat="server" ID="pp_sample1" >
                                NIsh
                            </cc1:PropertyPanel>

                        </cc1:Pane>   
                        <cc1:Pane ID ="Pane2" runat="server" Height="600px" Width="330px">
                            <cc1:PropertyPanel runat="server" ID="pp_sample2" >
                                NIsh2
                            </cc1:PropertyPanel>
                        </cc1:Pane>

     

            protected override void OnInit(EventArgs e)
            {
                base.OnInit(e);

                // Tab setup
                FirstTab = tabControl.NewTabPage("First");
                FirstTab.Controls.Add(Pane1);
                FirstTab.Controls.Add(Pane2);

                //save button
                ImageButton save = FirstTab.Menu.NewImageButton();
                save.Click += new ImageClickEventHandler(this.save_click);
                save.AlternateText = "Save";
                save.ImageUrl = GlobalSettings.Path + "/images/editor/save.gif";

            }

    This is what i am searching for, two panes under one tab.


    Thanks in Advance

  • Amit 6 posts 26 karma points
    May 15, 2013 @ 09:37
    Amit
    0

    Hi Guys,

    Got the solution, the aspx was getting copied to a different folder in the post build event.

    Anyways thanks. 

Please Sign in or register to post replies

Write your reply to:

Draft