If you are in a controlled environment and you know nothing else is going to be setting the onload event, you can register (Page ...
FWIW, the ASP.Net function Page.RegisterStartupScript places the registered script at the bottom of the page, after all controls.