call server side function then javascript



Hi,

I have a modal dialog box which i'm using to collect user data. what I want
to do is when the user clicks the 'submit' button add the data to the
database and then call the java script to close the window and pass a value
back to the parent page.

I've tried using RegisterStartupScript after the database update function but
this doesn't seem to work. Any help would be great.

Rob.

Code is:
'add data to db
addAction()

'close window
Dim strScript, strKey
strKey = "AddAction"
strScript = "<script language=JavaScript>window.returnValue = document.
getElementById('txtlbID').value; window.close();</script>"

Page.RegisterStartupScript(strKey, strScript)

--
Message posted via http://www.dotnetmonster.com
.