Link to home
Start Free TrialLog in
Avatar of dshi15
dshi15Flag for United States of America

asked on

How to pass a Datatable back from a user control to its hosting page?

How to pass a Datatable back from a user control to its hosting page?

I added a property in my user control page:

    Private objDataTable as DataTable

    .... set objDataTable value somewhere ....

    Public ReadOnly Property Shipments() As DataTable
        Get
            Return objDataTable
        End Get
    End Property

On hosting page, I used ucShip to refer my User Control, and tried to get the DataTable:
    Dim oTable as DataTable = ucShip.Shipments

Got error "object variable or with block variables not set"

Please help!
ASKER CERTIFIED SOLUTION
Avatar of pauljk1619
pauljk1619

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial