Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 27th, 2004, 01:05 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default DLL question

If I wanted to separate code in the Members section from the main site can I just create a new project and drop the new dll into the bin folder and the files where they go when I'm done?

 
Old May 27th, 2004, 01:22 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Can you elaborate? Is your goal to break out a part of one web application? You are going to run into problems if you try that. Explain what you want to do in more detail.
 
Old May 27th, 2004, 01:27 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Right now half of the size of the dll is from the members section and I was wanting to reduce it and make it where I can work on one part of the site that won't affect the other. ie. uploading the DLL file will cause an error if someone requests a page. If there are 2 dlls I'll have half a chance of affecting a user's experience.

 
Old May 27th, 2004, 01:32 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Well, given that all the code in a project gets compiled into one assembly, you can't easily break apart one web project. I suppose you could create a separate project for the members section. You just have to make sure you don't get into a situation where each project requires access to classes in the other. Then you'll get yourself into a circular reference problem. Of course, building 1 site out of two different web application projects could get you into other kinds of trouble.
 
Old May 27th, 2004, 01:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

The reason I asked is because I changed the template of an existing site but kept the old site there. The old stuff still works and I was wondering if I could keep it seperated like that. How would I call a class from a different assembly?

 
Old May 27th, 2004, 03:22 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you want to use a class from another assembly, that assembly needs to be referenced by the project. Then you can use the classes as you always have, but you'll need to use the full name of the class (including namespace) or use an Imports/using statement at the top of the code file where you will consume the other class.

Let's say you have a project called "MyClassLibrary" with a class in it called "MyClass". You need to do either this:

Dim objMyClass As MyClassLibrary.MyClass

   OR

Using MyClassLibrary
...
Dim objMyClass As MyClass





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP IIS and DLL question mat41 Classic ASP Basics 0 April 10th, 2008 06:43 PM
Install problems - VS 6.0 on XP SCRRUN.DLL PDM.DLL jeff4444 Visual C++ 0 December 6th, 2006 08:48 PM
The database dll crdb_oracle.dll could not be load Yeliz Crystal Reports 0 October 18th, 2006 08:12 AM
DLL & Excel - keep having to reset DLL reference! James Diamond Pro VB 6 2 May 25th, 2004 03:37 AM
Question about printing from .dll componets arianreyes2002 Classic ASP Components 0 April 15th, 2004 09:04 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.