In Masterpage you can write the Function
public void showall()
{
/* .....Your code goes here */}
In content page
in the Design window source add this code
<%@ MasterType VirtualPath="Masterpage Name" %>
after that in codebehind file you can access like this
master.showall();
now you can access the masterpage function in contentpage..