Search code examples
asp.netasp.net-ajaxmodalpopupextender

Where best to place modal popup in a GridView


I have a GridView which may contain 10's and 100's of rows, on each row is an Edit link that will present the user with a modal popup to allow them to edit some details.

There seem to be 2 approaches:

  • Place a modal popup in each row (simplifies population of existing values)
  • Have 1 modal popup defined outside of the table and populate using JS and/or AJAX

The 2nd option seems to be the most efficient, but is there a preferred/recommended option?


Solution

  • the 2nd option is largely better, if you dont do this, you will have a hidden pop-up for each row, which will cause a bloated slow page.

    Here what happen if you use option 1