Hi,
I recommend do not add your own page load even and do not add script runat=server in layout.master. layout.master already has a code behind compiled into mojoPortal.Web.dll and it already has a page load event. Adding your own could break existing functionality of layout.master.
If you want to make a menu you should encapsulate it in a control or UserControl, then you can use page load evet inside the UserControl and embed the UserControl into layout.master.
Best,
Joe