troubleshooting Question

what does oninit() does internally

Avatar of Pralad
PraladFlag for India asked on
ASP.NET
13 Comments1 Solution639 ViewsLast Modified:
Hi all
I have a class by name cuc_grid where i am using it for  population of datagrid in another page. When I have rows in the datagrid it will take more than a minute to get out of oninit() function otherwise it would exit within 1 second. The code snippet for my class and the oninit() function is as below, Could any one help me out as to why does oninit() class in this case is taking lot of time when i have a data in data grid.


 Public Class CUC_Grid
        Inherits System.Web.UI.UserControl

        Protected WithEvents ImgBtnDelete As System.Web.UI.WebControls.ImageButton
        Protected WithEvents ImgBtnAdd As System.Web.UI.WebControls.ImageButton
        Protected WithEvents ImgBtnModify As System.Web.UI.WebControls.ImageButton
        Protected WithEvents ImgBtnClose As System.Web.UI.WebControls.ImageButton
        Protected WithEvents ImgBtnView As System.Web.UI.WebControls.ImageButton
        Protected WithEvents ImgBtnHelp As System.Web.UI.HtmlControls.HtmlImage
       Protected WithEvents ImgBtnPreview As System.Web.UI.WebControls.ImageButton
        Protected WithEvents DGrdCommon As System.Web.UI.WebControls.DataGrid
        Private v_ClassNamePvStr As String
        Private v_MethodNamePvStr As String
        Public v_PageCodePbStr As String
        Public v_PageCaptionPbStr As String
        Public v_DataPbObj As Object
        Protected CUC_ShowErrors As CUC_ShowErrors
        Public v_DataStrArr As String()
        Protected WithEvents lblGridCaption As System.Web.UI.WebControls.Label
        Public v_OpModePbStr As String
        Public Event ButtonClicked(ByVal CallPage As String, ByVal Action As String)
        Dim v_GridcolorsPvStr As String
        Protected WithEvents ImgBtnPageNo As System.Web.UI.WebControls.ImageButton
        Protected WithEvents ImgBtnPrevious As System.Web.UI.WebControls.ImageButton
        Protected WithEvents ImgBtnNext As System.Web.UI.WebControls.ImageButton
        Protected WithEvents lblPages As System.Web.UI.WebControls.Label
        Protected WithEvents tdPage As System.Web.UI.HtmlControls.HtmlTableCell
        Protected WithEvents cboPageNo As System.Web.UI.WebControls.DropDownList
        Protected WithEvents lblPageNo As System.Web.UI.WebControls.Label
        Dim v_HideColumnsPvArr As Array
        Dim xmlDoc As XmlDocument      
        Dim ObjController As CController          

        Protected Overloads Overrides Sub OnInit(ByVal e As eventArgs)
                      MyBase.OnInit(e)
        End Sub                                                              

Await early reply
Thanks
Prahalad
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 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 13 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