I have an aspx page that does not have a separate source for the VB - it is
on top in between the <script> tags. I use the following statement
Dim oComLib as New ComLib
To reference a class called ComLib in a source member called ComLib.vb that
is found in the /Code folder of my project. It all works fine in the VWD2005
environment as when I run the aspx page, it processes the above statment and
"sees" the class reference in the code.
When I upload the /Code folder (and its contents) to a remote web server
running the 1.1 environment and then upload the .aspx page (which isn't in
the /Code folder) when the page comes across the above statement, I get the
error below. My questions are:
1) How do I get the .aspx page to "see" the ComLib class source file that is
in the /Code folder (which is where VWD2005 dictates it should be put if you
want it to be "generally consumable")
2) I don't want to /bin dll any of this, I want it all to interpret and
compile on the fly
3) Do I need to register the /Code/ComLib.vb on the 1.1 server in some way?
4) If I need to do a /bin dll using VWD2005, how do I do it as when I do a
build, nothing is put into a /bin folder
5) When I ran another .aspx page built in VWD2005 and uploaded to the same
remote web server that didn't reference anything like the /Code/ComLib.vb, it
ran fine without creating a dll and just having all the vb/html source within
one .aspx
Finally, the source member for class /Code/ComLib.vb has as it's first
statement
Public Class ComLib
so that should make it be referenced anywhere.
If someone could help that would be great - I searched and could not find
anything on this subject.
---------------------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'ComLib' is not defined.
Source Error:
Line 2: <script runat="server">
Line 3:
Line 4: Dim oComlib As New ComLib
Line 5:
Line 6: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
--------------------------------------------------------------------------------------------- 7 1272
"tonelab" <to*****@discus sions.microsoft .com> wrote in message
news:07******** *************** ***********@mic rosoft.com... I have an aspx page that does not have a separate source for the VB - it is on top in between the <script> tags. I use the following statement
Dim oComLib as New ComLib
To reference a class called ComLib in a source member called ComLib.vb that is found in the /Code folder of my project. It all works fine in the VWD2005 environment as when I run the aspx page, it processes the above statment and "sees" the class reference in the code.
When I upload the /Code folder (and its contents) to a remote web server running the 1.1 environment and then upload the .aspx page (which isn't in the /Code folder) when the page comes across the above statement, I get the error below. My questions are:
VWD2005 works with Framework 2.0, not 1.1.
John Saunders
<, VWD2005 works with Framework 2.0, not 1.1. >>
That's not completely true - I have created standalone .aspx pages in
VWD2005 that have both vb source and html in one .aspx file, uploded that
..aspx file to a 1.1 server and it runs just fine without creating a /bin dll.
It no different than creating an all inclusive .aspx file in WebMatrix and
uploading it to a 1.1 machine. So your statement is not completely correct -
you can create an .aspx page in VWD2005 that doesn't use a codebehind file
but rather is all-in-one, upload it to a 1.1 server and it will run perfectly.
Your statement is correct in that VWD2005 needs the 2.0 framework for
development purposes.
Can anyone else help me with the /Code folder question i posted previously?
Or is the only way that a 1.1 server can see a class file in a /code folder
(or anyo other folder for that matter) is by creating the /bin dll?
"tonelab" <to*****@discus sions.microsoft .com> wrote in message
news:E8******** *************** ***********@mic rosoft.com... <, VWD2005 works with Framework 2.0, not 1.1. >>
That's not completely true - I have created standalone .aspx pages in VWD2005 that have both vb source and html in one .aspx file, uploded that .aspx file to a 1.1 server and it runs just fine without creating a /bin dll. It no different than creating an all inclusive .aspx file in WebMatrix and uploading it to a 1.1 machine. So your statement is not completely correct - you can create an .aspx page in VWD2005 that doesn't use a codebehind file but rather is all-in-one, upload it to a 1.1 server and it will run perfectly.
Actually, you're just using VWD2005 as a fancy text editor. You could have
created the same application in Notepad, with the same amount of success.
The reason being that 1.1 doesn't know anything about a Code folder, or
about compiling code on the fly. That's a 2.0 feature.
John Saunders
Thanks for your perseverence in anwering this thread. Perhaps I can simplify
with an example:
-------------------------------------------------------------------
This file is called stored in /Code/ClassFile.vb
Imports System
Namespace ClassFile
Public Class ClassFile1
Public function GetTimer() as string
GetTimer = Timer.ToString
End Function
End Class
End Namespace
-----------------------------------------------------------------------------
This all in one page is saved in /Content/WebPage1.aspx
<%@ Page Language="VB" %>
<%@ Import Namespace="Clas sFile"%>
<script runat="server">
' Insert page code here
'
dim oClassFile as new ClassFile1
Sub Button1_Click(s ender As Object, e As EventArgs)
Button1.Text = oClassFile.GetT imer
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:Button id="Button1" onclick="Button 1_Click" runat="server"
Text="Button"></asp:Button>
<!-- Insert content here -->
</form>
</body>
</html>
----------------------------------------------------------------------
How do I make this work in 1.1 so that WebPage1.aspx can call the class
saved in ClassFile.vb without compiling a /bin dll? The inherits doesn't seem
to do it. All I really want is to be able to use a class found in another
source member. There has to be something that tells it where to look for
additional stuff.
The old asp way was to just put your classes into a source file and then use
the #include statement, to use an analogy.
Thanks
George
"tonelab" <to*****@discus sions.microsoft .com> wrote in message
news:33******** *************** ***********@mic rosoft.com... Thanks for your perseverence in anwering this thread. Perhaps I can simplify with an example: ------------------------------------------------------------------- This file is called stored in /Code/ClassFile.vb
Imports System Namespace ClassFile Public Class ClassFile1 Public function GetTimer() as string GetTimer = Timer.ToString End Function End Class End Namespace ----------------------------------------------------------------------------- This all in one page is saved in /Content/WebPage1.aspx
<%@ Page Language="VB" %> <%@ Import Namespace="Clas sFile"%> <script runat="server">
' Insert page code here ' dim oClassFile as new ClassFile1 Sub Button1_Click(s ender As Object, e As EventArgs) Button1.Text = oClassFile.GetT imer End Sub
</script> <html> <head> </head> <body> <form runat="server"> <asp:Button id="Button1" onclick="Button 1_Click" runat="server" Text="Button"></asp:Button> <!-- Insert content here --> </form> </body> </html> ---------------------------------------------------------------------- How do I make this work in 1.1 so that WebPage1.aspx can call the class saved in ClassFile.vb without compiling a /bin dll? The inherits doesn't seem to do it. All I really want is to be able to use a class found in another source member. There has to be something that tells it where to look for additional stuff.
Sorry, there isn't anything like this. It's a 2.0 feature.
John Saunders
so the bottom line to this whole long thread is that in 1.1 without creating
a /bin dll, there is no way for a codebehind vb file to see anything outside
of it's file and there is no way to emulate the old asp include= statement to
"bring in" any code from an external source file, is that correct?
what a shame.
George
"tonelab" <to*****@discus sions.microsoft .com> wrote in message
news:D8******** *************** ***********@mic rosoft.com... so the bottom line to this whole long thread is that in 1.1 without creating a /bin dll, there is no way for a codebehind vb file to see anything outside of it's file and there is no way to emulate the old asp include= statement to "bring in" any code from an external source file, is that correct?
There are very good reasons why the old way is the old way. For instance, if
you #include a class into one file, and also #include it in another, are
they the same class, or different classes?
This isn't scripting, it's programming. It's different.
John Saunders This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: dimension |
last post by:
Hi,
in visual studio 2005 beta, when i type "using System.Web." no code complete
helper pops up. Similarly, when typing "using System.Net." i do not see an
HttpWebRequest in the list that pops up. According to the documentation,
HttpWebRequest should be a part of the System.Web namespace.
I am not sure why this is happening? Can anyone assist?
|
by: Eugene |
last post by:
Can we use Visual Source Safe to keep MS Access files?
What are the pros and cons.
Any refernces and links on that topic.
Thanks, Eugene
|
by: Patrick Olurotimi Ige |
last post by:
Hi,
I have VStudio.Net 2003 installed but can i install Visual Web
Developer also on the same PC.
My current .Net Frameork version is 1.1.
Will the Visual Web Developer install ASP.NET 2.0?
And if i do will it affect my other applications?
I want ot build ASP.NET 2.0 apps!!!
|
by: Steve Richter |
last post by:
I have discovered that my web appl developed using the visual web
developer 2005 freebie will not work on my godaddy.com web hoster. So
I am using Visual Studio .Net 2003 Enterprise Architect dated April
2004 from an expired MSDN subscription.
Visual Studio .NET 2003, is that the latest Visual Studio for ASP.NET
1.1? Is there a service pack available for install? I dont see one on
the Microsoft web site.
The reason I ask is because...
|
by: William LaMartin |
last post by:
I just received my Visual Studio upgrade to 2005 and tried to create a new
web site via File | New Web Site with location http. Unfortunately I
received the following error:
"Visual Web Developer does not support creating Web sites on a SharePoint
Web server"
If I create a new server extensions 2002 web in IIS and mark it as an
application and try to use it from Visual Studio I receive the same error.
| |
by: William LaMartin |
last post by:
It was suggested that I post this query here rather than in the
Microsoft.public.dotnet.languages.vb group.
I just received my Visual Studio upgrade to 2005 Pro and tried to create a
new web site via File | New Web Site with location http. Unfortunately I
received the following error:
"Visual Web Developer does not support creating Web sites on a SharePoint
Web server"
|
by: m.roello |
last post by:
In the book:
"Working with Microsoft Visual Studio 2005"
Craig Skibo wrote:
"The power of Visual Studio 2005 lies in its ability to empower users to
build, test, and debug powerful applications quickly and easly."
I don't agree on what concernes ASP .NET Web Sites in VS2005.
All what involves Namespaces in Web sites has been disappeared. I know
you can still MANUALLY manage them, but not QUICKLY and EASLY. In a
|
by: jwwicks |
last post by:
Introduction
This tutorial describes how to use Visual Studio to create a new C++ program, compile/run a program, resume work on an existing program and debug a program. It is aimed at the beginning CIS student who is struggling to get their programs working. I work in the computer lab at the college I'm attending and I see many students who don't know how to use the IDE for best results.
Visual Studio automatically creates a number of...
|
by: Puja Patel |
last post by:
hi all,
am not sure if this is the right place for this post.
I created a website on .net framework 2.0 using visual studio 2005 and web
service software factory. I created all my business components and data
access classes using web service software factory.
Now my problem is there is a new version of web service software factory
available for visual studio 2008 and it creates data access classes in a
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |