In this article, I have explained, how to create datatable in asp.net and bind GridView with datatable without using Sql Server. Before we learn how, we first know why we need this functionality. For example in shopping cart we add items in it, but its not final until u give payment to it. So during that time we can store items in temparary table and when order is confirmed then items can be added in database table.
In page load method, we create datatable and in this table, we add columns in this table and give its datatype.
In Button OnClick Method, we get information form session and store in datatable and find sum of all Item Prices.
Output of adding information in textbox and after Calculation show in GridView.