Classes without compiling a dll

  • Thread starter Thread starter C Downey
  • Start date Start date
C

C Downey

Is there a way to access my .vb class files in my codebehind pages without
pre-compiling them first. We are working with multiple developers, so each
time I make a change to the class file the whole team has to update the dll.
I am using CodeBehind in all my files. I also created a whole bunch of class
files (e.g. common.vb) . All files are using the same Namespace. Here is a
little sample:( I am getting an error "Type 'Portal.Common' is not
defined." )

*****************************************
Webpage1.aspx
*****************************************
<%@ Language="vb" AutoEventWireup="false" src="WebForm1.aspx.vb"
Inherits="Portal.Multitest"%>

*****************************************
Webpage1.aspx.vb
*****************************************
Namespace Portal
Public Class Multitest
Inherits System.web.UI.Page

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim cc As New Portal.Common()
Response.Write(cc.testvar)
End Sub
End Class
End Namespace

*****************************************
Common.vb
*****************************************
Namespace Portal
Public Class Common
Public Shared testvar As String = "TEST"
End Class
End Namespace


thanks for any help
 
In your @Page directive, instead of using the CodeBehind attribute, use the
Src attribute to specify the source code file. The consequence is that you
will lose the benefits of having this pre-compiled when you deploy the
application.
 
Back
Top