GridView: Call ShowModalDialog from Server-Side Code and RetrieveValue

  • Thread starter Thread starter Mel
  • Start date Start date
M

Mel

On the main web page the user edits a GridView row and then clicks
Update. The server-side GridView_RowUpdating vb code is called to
update datatable rows and such and then shows a modal dialog to
display a prompt to enter a note. I am showing this dialog by calling
ScriptManager.RegisterStartupScript(...window.showModalDialog...).
How do I retrieve the return value (the note text) so I can update a
different gridview on the main page? What is the best way to achieve
my goal?
 
On the main web page the user edits a GridView row and then clicks
Update.  The server-side GridView_RowUpdating vb code is called to
update datatable rows and such and then shows a modal dialog to
display a prompt to enter a note.  I am showing this dialog by calling
ScriptManager.RegisterStartupScript(...window.showModalDialog...).
How do I retrieve the return value (the note text) so I can update a
different gridview on the main page?  What is the best way to achieve
my goal?

I never did figure out how to do it with a Modal Dialog. I ended up
using just a window.open call from server-side and writing a hidden
text box on the main form and forcing a postback.
 
Back
Top