By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,364 Members | 1,272 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,364 IT Pros & Developers. It's quick & easy.

Classes without compiling a dll

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"C Downey" <co**************@homtail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.