Ashish Khadye
How to add temp data to GridView and after inserting multiple temp entries, how to finally save all the entries in the database in an ASP.NET Web application.
By Ashish Khadye in .NET on Oct 07 2018
  • Sreekanth Reddy
    Oct, 2018 26

    Take a DataTable and store in viewstate. Then add data in the gridview from the datatable. If you are inserting new record, Then add that record into the datatable which is present in viewstate and bind that dt to the gridview.

    • 3
  • Ishoo Anyal
    Sep, 2019 27

    You can do it using ViewState just like how Srikanth described or you could use simple user specific singleton approach to ensure your data persist in class and keep using the same object, This will be faster and efficient as it will save lot of boxing unboxing

    • 0
  • Ketan Shinde
    Nov, 2018 21

    Yes , You can add temp data to list and bind data to gridview. then if want to data insert into database then you can add data in database using simple linq query

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS