How to Pass Datatable in Session C#

First assign datatable into Session.

 Session["DT"] = dt;

 Response.Redirect("Page2.aspx");

In Page2.aspx page Load function call the thease Code to Get Session Table.

DataTable dtm = (DataTable)Session["DT"];

Comments

Popular posts from this blog

Unable to perform operation on the item is locked in workspace

Maximum Stored Procedure Function Trigger or View Nesting Level Exceeded (limit 32) in SQL Server

Insecure cookie setting: missing Secure flag