How to reuse this C# code?
<p>I can´t find a way to reuse the code below in all my webpages.</p>

<p>How can I do it?</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {

        if (Page.Request.UrlReferrer == null)
        {
            Response.Redirect("test.aspx");
        }
    }
}
</code></pre>

<p>I´d like to use something like this:</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
{
    CheckURL();
}
</code></pre>

<p>Please, give me a example! :) I´m new using the C#! </p>
