Hi,
This function is defined in PortalPage class of Custom Portal which is the base class of event page. If you copy pages from custom portal to partner portal, you should make sure all function calls made in that page are defined in either in the code
behind file, or the base class file. So the simple solution is to copy this function from PortalPage class in custom portal to PortalPage class in partner portal.
Thanks,
-Jiulong