Load different ascx's in aspx page <p>On my aspx page I have on the left hand side TreeView for each of every node in the TreeView I want to load a different ascx which going to change only the right hand side of the page.</p> <p>Thats how my aspx.vb look like:</p> <pre><code> Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load RetrieveAllQueryStringParams() If Not IsPostBack Then GenerateDataSets() GenerateLabels() GenerateLinks() GenerateControls() GenerateOther() End If End Sub </code></pre> <p>When it's getting to GenerateLinks()</p> <pre><code> Protected Sub GenerateLinks() Dim subTreeStatisticalReport As RadTreeNode = rtvReports.Nodes.FindNodeByValue("StatisticalReport") Dim subTreeIncidentComparisons As RadTreeNode = rtvReports.Nodes.FindNodeByValue("IncidentComparisons") Dim subTreeGeographicLocations As RadTreeNode = rtvReports.Nodes.FindNodeByValue("GeographicLocations") Dim statTimeOfDayNode As RadTreeNode = subTreeStatisticalReport.Nodes.FindNodeByValue("TimeofDay") Dim statTrendsNode As RadTreeNode = subTreeStatisticalReport.Nodes.FindNodeByValue("Trends") Dim statTopSevenIncidents As RadTreeNode = subTreeStatisticalReport.Nodes.FindNodeByValue("Top7Incidents") Dim statIncidentPerCategory As RadTreeNode = subTreeStatisticalReport.Nodes.FindNodeByValue("IncidentsPerCategory") Dim compIncidentLoss As RadTreeNode = subTreeIncidentComparisons.Nodes.FindNodeByValue("IncidentLoss") Dim GeoMaps As RadTreeNode = subTreeGeographicLocations.Nodes.FindNodeByValue("Maps") statTimeOfDayNode.NavigateUrl = Globals.gRootRelativeSecureURL("/Reports/Reports.aspx?SessionID=" + m_SessionID + "&amp;qrptTOD=tod") End Sub </code></pre> <p>Now if the user is going to click on the Time Of Day Node it's going to load the same page again but different ascx.</p> <pre><code>Private Sub RetrieveAllQueryStringParams() Try If Not String.IsNullOrEmpty(Request.QueryString("SessionID")) Then m_SessionID = Request.QueryString("SessionID") m_qrptTOD = Request.QueryString("qrptTOD") ElseIf Not String.IsNullOrEmpty(Session("SessionID")) Then m_SessionID = Session("SessionID") End If If m_qrptTOD = "tod" Then Page.LoadControl("/Controls/Reports/rptTimeOfDay.ascx") End If Catch ex As Exception End Try End Sub </code></pre> <p>When it's getting here:</p> <pre><code> If m_qrptTOD = "tod" Then Page.LoadControl("/Controls/Reports/rptTimeOfDay.ascx") End If </code></pre> <p>the ascx page is not loading for some reason!! What I'm doing wrong?!?!?</p>