I'm doing a jquery ajax call to my server side c#. The c# code fills a datatable then sends the data to the aspx page using a JavaScriptSerializer
:
The datatable is initialized as a public:
public partial class _Default : System.Web.UI.Page
{
DataTable myDataTable = new DataTable();
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
//SqlDataReader builds loads data into dataTable...
HttpContext.Current.Response.Write(serializer(dataTable));
}
The aspx page finally creates a table from the data by posting it back to the aspx page. My next task is to sort the rows ascending/descending when the table heading is clicked (using another ajax call).
I'd like to perform a sort operation similar to the accepted answer in this question: Sorting rows in a data table
Will the datatable from the initial ajax call still be in memory? Thank you.