hey man... my bad. A dataset can actually be stored inside viewstate.<BR><BR>Actually I was trying to store my dynamically created table inside the ViewState and got the following error:<BR>The type 'System.Web.UI.WebControls.Table' must be marked as Serializable or have a TypeConverter other than ReferenceConverter to be put in viewstate.<BR><BR>This is my code:<BR>Private Sub PopulateTheTable()<BR> Try<BR> Dim tbHello As New Table()<BR> Dim trHello As TableRow<BR> Dim tdHello As TableCell<BR> Dim chkhello As CheckBox<BR> Dim intcount As Integer<BR> Dim tblHTML As String<BR> Dim dsdataset As New DataSet()<BR><BR> For intcount = 0 To 4<BR> tdHello = New TableCell()<BR> chkhello = New CheckBox()<BR><BR> chkhello.ID = "chk" & intcount<BR> chkhello.Text = "Hello " & intcount<BR> tdHello.Controls.Add(chkhello)<BR><BR> trHello = New TableRow()<BR> trHello.Cells.Add(tdHello)<BR> tbHello.Rows.Add(trHello)<BR> Next<BR> pclTest.Controls.Add(tbHello)<BR><BR> viewstate.Add("MyTable", tbHello)<BR> Catch exc As Exception<BR> End Try<BR> End Sub<BR><BR>Any ideas on how to go ahead and add the table in the viewstate?<BR>
I started to respond, but got pulled into a meeting that just would not end.<BR><BR>Anyway.... I have never had the need to programatically persist a table. I just tried and got the same error that you described. I played around with Binary Serialization, but could not get the formatter stuff right. Have you gotten anywhere with this....? Let me know.