troubleshooting Question

Improve Speed/Performance

Avatar of John Account
John Account asked on
.NET ProgrammingASP.NETVisual Basic.NET
4 Comments1 Solution411 ViewsLast Modified:
Come here and notice how super slow this website is crawling   and you will notice that it harly even moves!'s my code behind. This is using an MSSQL Express 2005. See anything in there that's causing the problem?--
Partial Class _Default
    Inherits System.Web.UI.Page
    Dim CP As CommonProcs = New CommonProcs
    Public strPageData As Object

    Sub RenderPage(ByVal sPageCode)
        Me.Title = CP.ReadPageData(sPageCode, "PageTitle")
        strPageData = CP.ReadPageData(sPageCode)
        If strPageData.ToString.Length > 0 Then
            lblData.InnerHtml = "<div class=" & Chr(34) & "content" & Chr(34) & ">" & strPageData & "</div>"
            strPageData = "No data found for the current page."
            lblData.InnerHtml = "<div class=" & Chr(34) & "content" & Chr(34) & ">" & strPageData & "</div>"
        End If
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
        End If
        MyMenu.Enabled = True
    End Sub
    Sub SayPageTitle(ByVal TPageCode As String)
        FlashControl1.FlashVarsCollection.Add(New FlashVarItem("txtval", CP.ReadPageData(TPageCode, "PageTitle")))
    End Sub
    Sub LoadTheMenu()
        Dim ds As DataSet = New DataSet
        Dim connStr As String = ConfigurationManager.ConnectionStrings("cmsdbConnectionString").ToString
        Dim conn As SqlConnection = New SqlConnection(connStr)
        Dim sql As String = "Select MenuID, Description, Text, ParentID from Vw_mst_Menu WHERE text<>'<theroot>'"
        Dim da As SqlDataAdapter = New SqlDataAdapter(sql, conn)
        ds.DataSetName = "Menus"
        ds.Tables(0).TableName = "Menu"
        Dim relation As DataRelation = New DataRelation("ParentChild", ds.Tables("Menu").Columns("MenuID"), ds.Tables("Menu").Columns("ParentID"), True)
        relation.Nested = True
        XmlDataSource1.Data = ds.GetXml()
    End Sub

    Protected Sub MyMenu_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles MyMenu.MenuItemClick
        MyMenu.Enabled = False
        If e.Item.ValuePath = "MakeAPayment" Then
            Response.Redirect("Default.aspx?PageCode=" & e.Item.Value)
        End If
    End Sub
End Class
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros