ASP NET How to read stack trace to fix error

Posted on 2006-04-03
Last Modified: 2008-03-03
I am getting the following error. How do I use the stack trace to determine what to do next?

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


me.pn1dsl = Session("pnDSL")
phMain.Controls.Add(Me.pn1DSL) <--- error
end if


[ArgumentNull Exception: Value cannot be null.
Parameter name: child]

System.Web.UI.ControlCollection.Add(Control child) +197
SeatUpdate.SeatUpdateDSL.Page_Load(Object sender, Event Args e) in c:\intetpub\wwwroot\SeatUpdate\SeatUpdateDSL.aspx.vb: 48

System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
Question by:marcon33
    1 Comment
    LVL 52

    Accepted Solution

    It suggests that the Session variable "pnDSL" is null. You could change your code to something like:

            If Not Session("pnDSL") Is Nothing Then
                Me.pn1dsl = Session("pnDSL")
            End If
        End If

    The stack trace really won't provide anymore useful information.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now