Passing information from gridview row to modal popup

uconnfb13 used Ask the Experts™

I currently have a gridview that displays data.  I have also included a "Change" button in the gridview using a template field. The change button is the control id of a modal popup, which will work as an edit menu for the specified row. I would like the "Change" button to do two things:

1.) Set a session variable
2.) Display a modal popup that I have already created (which will use the session variable)

I have tried simply setting the session variable using the onclick event of the button, but this function is never reached.  Instead, the popup is displayed.  Does any body know how or have an example of forcing a button to first make a trip to the server, and set a session variable before showing the modal popup?  I would assume this would entail doing something beyound the standard set up using the Ajax Control Tool Kit.

Thanks a lot!
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
handle row command event and set the session variable there.
Also in response.write add this:-

Response.Write("<script type='text/javascript'>" + Session["mydata].ToString() + ",'','');</script>'");

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial