Basically I have three pages Page1.asp,Page1.aspx.vb, LogTransactions.vb. Notice that I am using the src attribute in the aspx page so I don't have to compile/build the project everytime I make a change to the page. That's all good .. but how do I access the class inside the LogTransactions.vb page WITHOUT having to compile the LogTransactions.vb to a dll and placing it in the /BIN folder. I had tried the <%@ Assembly Src="LogTransactions.vb" %> in the Page1.aspx file but that did not seem to work. Is there anyway to get this to work?
Page1.aspx
<%@ Page Language="vb" AutoEventWireup="false" src="Page1.aspx.vb" Inherits="Page1"%>
<html>
<head>
<form>
<!--Stuff in here-->
</form>
</head>
</html>
Page1.aspx.vb
Public Class Page1
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
LogTransactions.LogTransaction(UserID, "LookAtADoc")
end sub
end class
LogTransactions.vb
Public Class LogTransactions
Public Shared Function LogTransaction(ByVal sUserid As String, ByVal sTransaction As String)
'Simple Insert INTO DB
end function
end class
Page1.aspx
<%@ Page Language="vb" AutoEventWireup="false" src="Page1.aspx.vb" Inherits="Page1"%>
<html>
<head>
<form>
<!--Stuff in here-->
</form>
</head>
</html>
Page1.aspx.vb
Public Class Page1
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
LogTransactions.LogTransaction(UserID, "LookAtADoc")
end sub
end class
LogTransactions.vb
Public Class LogTransactions
Public Shared Function LogTransaction(ByVal sUserid As String, ByVal sTransaction As String)
'Simple Insert INTO DB
end function
end class