# Adding Headers and Footers to Printed Pages

Learn how you can add headers and footers to the printed pages by using Spread for ASP.NET.

## Content

You can add headers and footers to the printed pages by using the Content property in the PrintSheet event. You can use HTML characters in the header or footer string. An example of this would be the line break tag, \<BR>, for breaking to a new line.

## Using Code

Set the **Content** property in the [PrintSheet](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.PrintSheet.html) event.

## Example

The following code adds a header and footer to the printed page.

```csharp
private void FpSpread1_PrintSheet(object sender, FarPoint.Web.Spread.PrintEventArgs e)
   {
     if (e.Header == true)
     {
      e.Content = "Header<BR>Test";
     }
    if (e.Header == false)
    {
     e.Content = "Footer";
    }
   }
```

```vbnet
Private Sub FpSpread1_PrintSheet(ByVal sender As Object, ByVal e As FarPoint.Web.Spread.PrintEventArgs) Handles FpSpread1.PrintSheet
   If e.Header = True Then
    e.Content = "Header<BR>Test"
   End If
   If e.Header = False Then
    e.Content = "Footer"
   End If
End Sub
```