Create a shared method in the code-behind and then reference it like so:

"pagename.aspx/method name"

don't forget to [WebMethod] attribute.

Hope this helps