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

Display Canvasjs Line Chart using Data from Database

What are the SOLID principles, and why are they important

Write Text in Notepad files Using Asp.net