If you are in a controlled environment and you know nothing else is going to be setting the onload event, you can register (Page.RegisterStartupScript) a script that will both set the body.onload ...
这样的:我想在ascx控件里显示数据。从数据库查询出来之后呢,我在赋给js变量。通过js我在显示在页面之上。这样就要调用js的onload事件。可是我写了,页面一点反应都没有。也没有任何报错信息。