cross page postback for gridview data
Posted on 2010-01-04
I am trying to use cross page postback to pass data of one grid to another page. I could get the instance of the grid in the target page and it is populated as it the rowcount returns the same number of rows as the gridview from the source page.
Dim gridview2 As New GridView
gridview2 = CType(PreviousPage.FindControl("GridView1"), GridView)
My question is, how can I bind the datasource to the gridview in the target page? I used this
Dim dt As DataTable = CType(gridview2.DataSource, DataTable)
but the datatable returns null.