Pradeep,
Depending on the size of the table it could make for a very slow load of
your page on the client, but other than watching the table's size it should
be fine.
Now .Net might be getting confused because when you save the table to
viewstate you are referencing it through the dataset it's in. Perhaps it
thinks you are saving the entire dataset?
Try setting the table to a new container and then saving that container to
viewstate:
Dim MyDataTable As DataTable = dsRedemption.T_Redemption_Dtl
ViewState("mydata") = MyDataTable
Dim x As New DataTable
x = CType( ViewState("mydata"), DataTable)
Sincerely,
--
S. Justin Gengo, MCP
Web Developer
Free code library at:
www.aboutfortunate.com
"Out of chaos comes order."
Nietzche
"Pradeep" <pr********@hotmail.com> wrote in message
news:uj*************@TK2MSFTNGP10.phx.gbl...
Hi,
I am storing the DataTable in a ViewState.
ViewState("mydata") = dsRedemption.T_Redemption_Dtl
Then I am casting the ViewState into a DataTable variable.
Dim x As New DataTable
x = CType( ViewState("mydata"), DataTable)
This is giving me a error where it's not allowing me to Cast it. If i
directly see the data in the ViewState("mydata") it's perfectly fine.
First of all, is it advisable to store the DataTable in the ViewState ???
Any idea ???
Pradeep