This tutorial shows how we can create our own classes and use shared code between different pages on our website. VB version.

Visual Studio allows you to create classes in separate files to be used in multiple pages on your website.
Classes you create are stored in the App_Code folder and can be in any language you prefer. For this tutorial, we’ll create a sample class:

The code-behind should look something like this:

Download Source Files