Check box selection

Hi,
if we have multiple check boxes on web page how to checked all if the check box selectors are also different?
If there are like multiple pages like 1 2 3 …Next then how can we select all checkboxes on each page ?