This is kind of a basic overview of how to create a class file in VB.NET and use it in your Web application.

Here is the code for the CallHistory class. Notice where the file needs to be located in the application.
Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Data.SqlClient
Public Class CallHistory
Public Sub AddCallHistory(ByVal ReviewID As Integer, ByVal UserID As Integer, ByVal EventName As String)
Dim strSQLConn As SqlConnection
Dim cmd As SqlCommand
strSQLConn = New SqlConnection(ConfigurationManager.ConnectionStrings("CCMConnectionString").ConnectionString)
cmd = New SqlCommand("p_AddCallHistory", strSQLConn)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@ReviewID", ReviewID)
cmd.Parameters.AddWithValue("@UserID", UserID)
cmd.Parameters.AddWithValue("@DateChanged", Now())
cmd.Parameters.AddWithValue("@EventName", EventName)
Try
strSQLConn.Open()
cmd.Connection = strSQLConn
cmd.ExecuteNonQuery()
Finally
strSQLConn.Close()
End Try
End Sub
End Class
Now we can use this class anywhere in our web application using the following technique.
First import our CallHistory namespace
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="CallHistory" %>
Next, we create an instance of the class:
'Add the call to the CallHistory table
Dim newCallHistory As New CallHistory
then we call the method
newCallHistory.AddCallHistory(ReviewID, lblUserID.Text, "Call Added")