?
Solved

Add web user control to class library project in Visual Studio 2003

Posted on 2005-04-06
9
Medium Priority
?
284 Views
Last Modified: 2012-06-21
I have a Solution in VS2003.  Within this solution are a number of projects.  One is a web project and the rest are class libraries where user controls are created to be used in the web project.

It is now my turn to create a new project.  I want to be able to add web forms and web user controls but I don't want the project to be a web project.  The end result is the web project will reference the class libraries DLL and any other necessary files will be copied over to the appropriate folders within the web structure.

This is somewhat akin to the likes of DotNetNuke and Rainbow.  I am creating a module that I will be adding (although not to either of these products, just one sort of like them).

What kind of project do I create so I can add whatever ascx, aspx and cs files I want?
0
Comment
Question by:dij8
7 Comments
 
LVL 7

Expert Comment

by:maXXXeE
ID: 13724007
>>but I don't want the project to be a web project
y u dont want it to be a web project?, cos a web project can add all the files u specified(ascx, aspx, cs)
0
 
LVL 10

Author Comment

by:dij8
ID: 13724403
I tried it as a web project but that seemed to not work.  I don't need the web.config or global.asax because it is not an individual web site.  It will never be a web site.  There will never be a start page because it won't work like that.  I just want to use class files, user controls and occasional stand-alone web pages.

Individual class files will do the usual individual class thing.  User controls will be loaded into my existing website kind of like the modules of DotNetNuke and rainbow.  I also need web pages as separate pop-ups.  What sort of project will do this?
0
 
LVL 9

Expert Comment

by:Type25
ID: 13725104
Just create an empty project then...

File > New > Project > Empty Project

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 10

Author Comment

by:dij8
ID: 13922924
Sorry.  I haven't forgotten this one.  It has just been put on hold.  I should be able to test within the next week or two.
0
 
LVL 10

Author Comment

by:dij8
ID: 14015035
An empty project doesn't give me the ability to create aspx or ascx pages.  A blank project is exactly what I want though.  I just don't want to have to deal with web addresses and the like.  Which makes the choice of an empty web project just as bad.  The whole solution is controlled under VSS and when I try to add web projects from source safe on my PC at home I have issues with web addresses that don't exist.

Is there a plug-in or whatever they're called for VS2003 that allows opening of any file type?  When I try to add a new item aspx and ascx files are just not an option in my current projects.  I'm mostly new to .Net so kind of need the extra files and code bits that are added automatically within VS2003.
0
 
LVL 10

Author Comment

by:dij8
ID: 14015134
In thinking through the idea of a plug-in I did a more refined search and found this page:
http://pluralsight.com/wiki/default.aspx/Fritz.AspNetWithoutWebProjects

Which in turn sent me to this page:
http://pluralsight.com/wiki/default.aspx/Fritz/AspNetWithoutWebProjects2.html

This works perfectly and took me minutes to do.  Now when I want to add a new item in the add new item dialog there are two panels (as before) and in the left panel is a folder structure (as before) to select the type of files you want.  I now have an extra folder called "web" where all the usual web file types are.

That this is not an option in VS2003 already I think is a major shortfall.  I haven't seen VS2005 so maybe they have it sorted in that but I think this solution is worth keeping because me and the person who wrote the article I read can't be the only ones wanting to achieve this.  Can this question be PAQ'd please TheLearnedOne?
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 14112787
Submitted to PAQ with points refunded (250)

DarthMod
Community Support Moderator
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question