473,657 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Classes without compiling a dll

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.a spx.vb"
Inherits="Porta l.Multitest"%>

*************** *************** ***********
Webpage1.aspx.v b
*************** *************** ***********
Namespace Portal
Public Class Multitest
Inherits System.web.UI.P age

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) 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
1 1276
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******** ********@TK2MSF TNGP10.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.a spx.vb"
Inherits="Porta l.Multitest"%>

*************** *************** ***********
Webpage1.aspx.v b
*************** *************** ***********
Namespace Portal
Public Class Multitest
Inherits System.web.UI.P age

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5810
by: Hal Vaughan | last post by:
I'm not sure what the correct name for this would be. I'd think it's either an indirect reference, or a pointer, or something like that. I'm working on a program that would call a series of classes in different orders and there are times where I may add extra classes that weren't part of the original design. I'd like to be able to store a list of the classes, in the order that they are used, in a text file. Then I could have the first...
2
1637
by: Vish | last post by:
Hi, I have a set of nested object classes that now i have to serialize/deserialize to make webservice calls. I was thinking wouldn't it be better to use an XML Data document instead of using classes so i can import/export xml with ease and also i can update my schema without compiling the code. What advantages/disadvantages do you guys see in taking this approach. Any kind of suggestions are welcome. Thanks!
3
4199
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a managed point-of-view I've noticed that: 1) for each managed and unmanaged C function (not C++ classes) I get a public managed static method (defined on a 'Global Functions' class) in the generated assembly with an export name of the form...
11
243
by: Alex Maghen | last post by:
I love that I can create ASPX and ASCX files with CS code embedded or in code-behind files and ASP.NET will auto-compile it all for me. I *like* it that way Is there ANY way to have classes defined in .cs files somewhere and have them accessed by my ASPX, ASCX, and Code-Behind files WITHOUT having to manually compile them first???
2
1336
by: jason | last post by:
Please pardon my completely lack of understanding on the topic. I have a website I developed with another developer. We are both far from experts in VB.NET and OOP. We developed the site WITHOUT VS.NET, compiling vb.net code into a common dll in the bin directory off the root of the website. That one vb code creates a namespace we import in all of our ASP.NET code. Compiling was done fromt he command line use vbc.exec. The site works...
2
3335
by: pagekb | last post by:
Hello, I'm having some difficulty compiling template classes as containers for other template objects. Specifically, I have a hierarchy of template classes that contain each other. Template class B has an instance of template class A, which has some base type T (usually int or double). However, the base type T is important to calculations in B, so I would like to obtain access to the type for further variable declaration within B. ...
3
2756
by: Tigger | last post by:
I have an object which could be compared to a DataTable/List which I am trying to genericify. I've spent about a day so far in refactoring and in the process gone through some hoops and hit some dead ends. I'm posting this to get some feedback on wether I'm going in the right direction, and at the same time hopefully save others from going through the process.
12
11073
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms. Here is a newbie mistake that I found myself doing (as a newbie), and that even a master programmer, the guru of this forum, Jon Skeet, missed! (He knows this I'm sure, but just didn't think this was my problem; LOL, I am needling him) If...
4
1705
by: bob_jenkins | last post by:
C# allows code to be generated, but the generated code is in its own assembly. Is there a way for that generated code to access internal classes in the assembly that produced it? To have the generated code pretend to be part of the assembly that produced it? Maybe some compilation option? I want the generated code for efficiency, but I don't want to pay for it by making all sorts of classes public that would otherwise be internal.
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8504
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7337
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6169
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1622
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.