473,383 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

A solution with multiple web projects and ASPX page reusability

Hi,

Is there any way to break a web application into separated web projects, so
we can re-use pages\?

I am trying to put aspx pages and/or ascx pages in separated web projects,
but when we run the solution, the start-up web project contain all necessary
aspx/ascx pages + dlls to run.

Any help would be appreciated,

Max

Oct 1 '07 #1
2 1834
hi max
the easiest step is to place the code behind files in a class library
project and compile them. then you can refer to the full namespace of the
code behind class in the Inherits attribute in your ASPX page declaration.
this way you at least get to re-use the codebehind, although you would still
have to deploy the ASPX file itself. there is also a way of compiling ascx
pages into a binary, http://msdn2.microsoft.com/en-us/library/aa479318.aspx

hope this helps
tim

"Max2006" <al*******@newsgroup.nospamwrote in message
news:Ol**************@TK2MSFTNGP05.phx.gbl...
Hi,

Is there any way to break a web application into separated web projects,
so we can re-use pages\?

I am trying to put aspx pages and/or ascx pages in separated web projects,
but when we run the solution, the start-up web project contain all
necessary aspx/ascx pages + dlls to run.

Any help would be appreciated,

Max
Oct 1 '07 #2
Thanks for Tim's input!

Hi Max,

Yes, as Tim suggested, for web application, you can easily reuse the codes
via define common classes or base classes and separate them into a class
library.

However, for aspx page or other page stuffs, it is not quite convenient and
practical to separate them into separate projects because diffrent project
may result to different Application context(such as appdomain, cache,
sessionstate boundary...) and it will be much difficult for you develop the
pages' code and coordinate them.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Tim Mackey" <ti********@community.nospam>
References: <Ol**************@TK2MSFTNGP05.phx.gbl>
In-Reply-To: <Ol**************@TK2MSFTNGP05.phx.gbl>
Subject: Re: A solution with multiple web projects and ASPX page
reusability
>Date: Mon, 1 Oct 2007 16:06:26 +0100
>
hi max
the easiest step is to place the code behind files in a class library
project and compile them. then you can refer to the full namespace of the
code behind class in the Inherits attribute in your ASPX page declaration.
this way you at least get to re-use the codebehind, although you would
still
>have to deploy the ASPX file itself. there is also a way of compiling
ascx
>pages into a binary, http://msdn2.microsoft.com/en-us/library/aa479318.aspx

hope this helps
tim

"Max2006" <al*******@newsgroup.nospamwrote in message
news:Ol**************@TK2MSFTNGP05.phx.gbl...
>Hi,

Is there any way to break a web application into separated web projects,
so we can re-use pages\?

I am trying to put aspx pages and/or ascx pages in separated web
projects,
>but when we run the solution, the start-up web project contain all
necessary aspx/ascx pages + dlls to run.

Any help would be appreciated,

Max

Oct 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: FredC | last post by:
I have a solution that contains three projects. Using the Property page, Startup Project I've defined which projects to start and the order. When running, each project presents a form or a task...
2
by: Brian Shannon | last post by:
I am playing around with building my own classes for use in multiple projects. Some of my post I have made respondents suggested including my project that creates a class with the main project. ...
0
by: Shawn Cutter | last post by:
I am beginning work on a somewhat complex project and I need to decide what route to take before beginning the project. The main issue with this project is that it needs to be modular and support...
1
by: David Herbst | last post by:
I have a solution that contains one main web project, ten sub web projects and a controls library project all in a single web application. I followed the steps in the following MS KB: How To...
7
by: JohnGoogle | last post by:
Hi, I'm new to Visual C# and I am looking for guidance with structuring projects. I am wanting to develop a DLL assembly which will contain all my common classes which will be used by various...
1
by: Nathan Sokalski | last post by:
I have a Visual Studio Solution that contains multiple ASP.NET Projects. I do not want to put all of the pages (*.aspx files) in the root directory of my site, because that would be very...
9
by: moondaddy | last post by:
I'm using asp.net 2.0 and c# and would like to share some user control between several websites. these websites are on the same server and have a physical location right next to each other like...
3
by: Sami Lakka | last post by:
I have a solution with a two projects. The first project contains my classes and an executable using those classes. The second project contains unit tests for the classes. Because the unit test...
9
by: GaryDean | last post by:
I know this is a vs issue but nobody seems to answer posts over there... In VS 2008 I can't seem to get a multiple project solution. If I create a blank solution and add a project to it, it...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.