sqlDataAdapter1.Fill(dSet);
System.IO.StringWriter sw = new System.IO.StringWriter();
// Write the DataSet to the ViewState property.
dSet.WriteXml(sw);
ViewState["dSet"] = sw.ToString();
Public ReadOnly Property MyDataSet() As DataSet
Get
If viewstate("MyDataSet") Is Nothing Then
viewstate("MyDataSet") = New DataSet()
End If
Return viewstate("MyDataSet")
End Get
End Property