Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > A solution with multiple web projects and ASPX page reusability

Reply
Thread Tools

A solution with multiple web projects and ASPX page reusability

 
 
Max2006
Guest
Posts: n/a
 
      10-01-2007
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



 
Reply With Quote
 
 
 
 
Tim Mackey
Guest
Posts: n/a
 
      10-01-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>


 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      10-02-2007
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" <(E-Mail Removed)>
>References: <(E-Mail Removed)>
>In-Reply-To: <(E-Mail Removed)>
>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" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>> 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
>>
>>
>>

>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interesting article on SOA Reusability: Shrinking the Lag between Business and IT Jerry Mcnealy XML 0 08-14-2007 06:32 AM
Interesting article on SOA Reusability: Shrinking the Lag between Business and IT Jerry Mcnealy Java 0 08-14-2007 06:32 AM
Gauging interest for experimental software platform/runtime/language with main goals being ease-of-use and "building-block style" seamless reusability over distributed runtimes... gavinconrad85@gmail.com Java 1 04-27-2007 03:53 AM
Code Reusability -- Extending web Application =?Utf-8?B?cG9wc292eUBydXNtZXguY29t?= ASP .Net 3 02-02-2004 06:37 PM
Re: One solution containing multiple projects and multiple hosts Stephen Miller ASP .Net 0 06-24-2003 12:55 PM



Advertisments