Safe to have client-side AND server-side page load event procedures?

F

Fred

I'm combining the functionality of two existing aspx pages into one new
page.

One of the existing pages has a server-side Page_Load event procedure.
The other has <body onload="Init();"> (and Init() is of course a client-side
function).

Just wondering if it would be a mistake to try to have both of these
procedures (Page_Load and <body onload...>) in the new aspx page. Is there
anything wrong with doing it? Is it perfectly safe?

Thanks.
 
C

Craig Deelsnyder

I'm combining the functionality of two existing aspx pages into one new
page.

One of the existing pages has a server-side Page_Load event procedure.
The other has <body onload="Init();"> (and Init() is of course a
client-side
function).

Just wondering if it would be a mistake to try to have both of these
procedures (Page_Load and <body onload...>) in the new aspx page. Is
there
anything wrong with doing it? Is it perfectly safe?

Thanks.
They're totally separate from each other. The Page_Load is the ASP.NET
page's server side loading, while the other (body onload) is when the
resulting HTML page is loaded in the client browser. They completely
different 'concepts' and don't impact each other directly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top