For do this normally I use the RegisterClientS criptBlock() method of Page.
Example :
string s = "<script>window .close();</script>";
RegisterClientS criptBlock("clo se", s);
If you want to put code in onload you can make body runat=server and then
declare this in your page as generic HtmlControl so you can write :
html.Attributes["OnLoad"] = ".....";
you can write all your javascript here, or call a function and then put it
on client with RegisterStartup Script method (the use is similar to
RegisterClientS criptBlock)!
Brun.
"Marcel" <ma************ @REMOVEMEmsn.co m> wrote in message
news:uQ******** ******@TK2MSFTN GP11.phx.gbl...
I have a subwindow hich displays a grid. When the user selects a row from
the grid, I wish to store the selected row ID in session state and close
the subwindow, returning focus to the parent (opener).
Normally I would do this in javascript, but I cannot find any client side
intelligence in the grid, so I wish to close the window on the select
index changed event when I return to the server.
I can't remeber how to add an OnLoad attribute to the <BODY> tag - as that
would do it.
Please help.
Marcel