CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.vs_2005_web_application_projects Tags:
Item Type: NewsGroup Date Entered: 6/29/2007 7:35:50 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 21 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
ask4help
Asp.Net User
how to refer a class from different folder6/29/2007 7:35:50 AM

0/0

Hi,

 I have a webproject called webproject1 (C:\webproject1).  This contains default.aspx, default.aspx.cs files.  This is under namespace myTest.

I have a folder called test under c:\webproject1 (c:\webproject1\test).  This test folder is also contains defaultTest.aspx, defaultTest.aspx.cs.  This is under namespace myTest1.

 How do I refer myTest1.defaultTest in default.aspx (myTest.default) ????

 Thanks.

amarsuperstar
Asp.Net User
Re: how to refer a class from different folder6/29/2007 11:40:14 AM

0/0

Have you added a namespace reference? This is done by putting "using myTest1" at the top of the class within which you are trying to use the reference.

 

Amar 

ask4help
Asp.Net User
Re: how to refer a class from different folder6/29/2007 3:25:03 PM

0/0

Hi Amar,

Thanks for the reply.

 That didn't help me.  I put that using statement at tthe top and when I was trying to use it, it is not displaying the classes it contains.

 Thanks!

Benson Yu - MSF
Asp.Net User
Re: how to refer a class from different folder7/3/2007 3:57:56 AM

0/0

Hi ask4help,

To answer this question, we should make a difference between Web Site project and Web Application project. For Web Application project, Amar?s answer is correct. For Web Site project, it is limited so that the Intellsense at design time may not work. For the reason please refer to the following link:

ASP.NET Web Site Precompilation Overview 
http://msdn2.microsoft.com/en-us/library/399f057w(vs.80).aspx

It is possible for a base page class (a code-behind class) to reference the associated page class (.aspx file) and page class members using a fully qualified class name. However, this type of reference will not work when precompiling your site with source protection enabled. This is because the base page class from the code-behind file is not located in the same assembly as the page class derived from the .aspx page. For more information on precompilation with source protection enabled, see How to: Sign Assemblies for Precompiled Web Sites.

To get the Intellsense support at design time, I suggest you to upgrade the Web Site project to Web Application project. To do so, please refer to the following link:

Upgrading VS 2005 Web Site Projects to be VS 2005 Web Application Projects
http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx

 


Sincerely,
Benson Yu
Microsoft Online Community Support

Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
JavaServer Pages Illuminated: Jones and Bartlett Illuminated Series Authors: Prabhakar Metlapalli, Pages: 531, Published: 2007
Foundation Flex for Developers: Data-Driven Applications with PHP, ASP. Net, Coldfusion, and LCDs Authors: Sas Jacobs, Koen de Weggheleire, Pages: 545, Published: 2007
The Everyday Internet All-in-One Desk Reference For Dummies Authors: Peter Weverka, Pages: 624, Published: 2005
Emarketing Excellence: The Heart of EBusiness Authors: PR Smith, Dave Chaffey, Pages: 372, Published: 2005
Macromedia Flash 8 @work: Projects and Techniques to Get the Job Done Authors: Phillip Kerman, Pages: 416, Published: 2006
C++ in a Nutshell: A Desktop Quick Reference Authors: Ray Lischner, Pages: 791, Published: 2003
Visual Information Systems Authors: Clement H. C. Leung, Pages: 274, Published: 1997
Multimedia Introduction to Programming Using Java Authors: David Gries, Pages: 536, Published: 2005
Design Patterns for Object-oriented Software Development Authors: Wolfgang Pree, Pages: 268, Published: 1994

Web:
how to refer a class from different folder - ASP.NET Forums Re: how to refer a class from different folder. 06-29-2007, 7:40 AM. Contact ... Re: how to refer a class from different folder ...
KBAlertz.com: (837908) - Describes the different ways to refer to ... ... ways to refer to the assemblies that are put in different folders. ... Add the following code to the Class1 class of the Class1.vb file or of the ...
Managing Your Time Effectively: Organizing Classes, many different ... many different ways, manilla folder, semester tests: Hi Shawnee; Boy, ... You have no idea how many times you are going to refer back to something that you ...
C# Programming: Namespaces and the Base Classes Part 4 - File and ... NET base classes generally refer to folders as directories in class and method names. .... and the various classes represent different specializations, ...
File folder - Wikipedia, the free encyclopedia As stated, some refer to file folders simply as folders, but in North America this is confusing because folder can refer to several different things. ...
.NET ASP.NET is there a way to refer to public properties in other ... I'll try putting a class in the app_code folder and see if I can get what I want . I'm fully aware that classic .asp is a totally different ...
Zope 3 wiki Modules Are Global Indirect references to classes can refer to either global or local classes. ... folders and bundles, may be registered, but there are subtly different ...
refer to a public shared class in app_code folder in ASP.net I also made a public class in the app_code folder called 'allvars' In the main web page durning the page startup, I can refer to public ...
mail::folder::createSubFolder The mail::folder object will refer to the newly-created folder. ... mail::folder created by one mail::account may not be used with a different mail::folder. ...
Tweener Documentation and Language Reference More than that, it uses several different classes together, ... There's no need to refer to the specific folder where your classes are copied (other than ...

Videos:
How to install / get ipa files onto iPod Touch iPhone 2.1 + Download ipa files free !!! ***PLEASE READ, GETS UPDATED ALL THE TIME*** I'm going to show you how to put .IPA file apps onto your jailbroken iPhone 3G or iPod Touch. Using Win...
Download YouTube Videos to Zune [See Description for Errors] This video Zune tutorial will show you how to download videos from YouTube and add them to your Zune. Note: When selecting a folder to save the conv...
Project 3: Digital Portfolio Pre-Production Everyone can use a digital portfolio. It is a way to portray who you are and what you can do. This video begins the construction of a digital portfol...
Rise Of The Triad For Psp Slim ~ Good Classic Psp Shooter WHATS NEW ------- - Slim psp support. - fixed a memory leak bug, crashing the game after 5-10 minutes of playing. - fixed intro screens / cut scenes ...
PSTI Sample Video #3 Participants in the 2007 NASA / NIA / Fresno State Pre-Service Teacher Institute discovered how to use 21st century communication skills to help them...
Affiliate Summit 2006 East -- Straight Talk on Search Engine Optimization Brief presentation on Search Engine Optimization with a heavy focus on Q&A. A very open, honest and straight to the point discussion about search eng...




Search This Site:










public variables with protected subs.

2.1.2 mirrors

how to reuse code? like #include in classic asp

rowcommand item index

style sheet doesn't work!

cannot log in after upgrade to 3.2

best practice for enabling single sign on for asp classic 3.0 and asp.net 2.0

setting up a static menu with different dynamic submenus in a different place

project help

white border around module

upgrade error 3.1 to 3.2.2. please help

how do i not bind a data grid when i call page.databind

problems modifying documents module

how to get the form innerhtml ?

webmail in asp.net

reset button doesn't fire selectedindexchanged event

expanded nodes in treeview

3.0.8, error when compiling

asking a user to verify before a delete

deploying the web application to moss 2007

handling rss feeds

setting checked value in repeater

custom web part verb visibility dependant on webpartmanager.displaymode

approval process?

how to contact john laroche for magicgadget?

suggestion to avoid modification to the core

creating and deleting controls from codebehind

avoid serving solpartmenu.js?

accessing a pasword protected xml file via http

no aspnet user, but site seems to work...

 
All Times Are GMT