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

  • Thread starter Thread starter Fred
  • Start date Start date
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.
 
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.
 
Back
Top