Take the 2-minute tour ×






share|improve this question

1 Answer 1

up vote 2 down vote accepted

I would have a modal dialog to capture the reason and date when the user clicks the "Change" button. On each row, next to the button include a hidden field that contains the row ID, or better yet the key for the record in the db. Then when you launch your modal, use jQuery to select the hidden field next to the button to grab the key value, and submit it as part of your modal form.

the jQuery would look something like:

 $(function() {
     $(".changeButton").click(function() {
         var rowId = $(this).siblings(":hidden").val();
         $("#myModal input[name=rowId]").val( rowId );
         // do modal popup
share|improve this answer
+1 but could/would it be easier to pass the id to the function via parameter? –  stormdrain Jul 3 '10 at 2:06
Yes, you could also do something like: onclick="popupChange(<%# Eval("Id") %> );" inline with your command button. –  dave thieben Jul 3 '10 at 15:38

Your Answer


