how to transfer a datatable from one page to another asp.net vb.net?

HOUSSEM MAHJOUBI 286 Reputation points
2022-07-02T08:23:18.967+00:00

Hi members
i have a gridview that filled up using a datatable from 2different way
so the result in gridview depend on the way of users are using
in next page i want get the result of that gridview
i look to transfer the datatable from the 1st webpage because the datatable is more couvinien and easy to manage
so please how i can transfer a datatable from page to another?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,779 questions
0 comments No comments
{count} votes

Accepted answer
  1. AgaveJoe 29,786 Reputation points
    2022-07-02T09:51:17.453+00:00

    so please how i can transfer a datatable from page to another?

    The standard approach is populating the DataTable from a database.

    Another approach is caching the DataTable in ASP.NET Session or MemoryCache.

    Session("MyDataTable") = MyDataTable  
    

    Keep in mind, it is always better to get data from the source like a database.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.