Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Why can't user controls be compiled into DLL and shared with other web applications

Reply
Thread Tools

Why can't user controls be compiled into DLL and shared with other web applications

 
 
Matt Adamson
Guest
Posts: n/a
 
      03-05-2007
Guys,

Does anyone know the technical reason why user controls couldn't be compiled
into an assembly and shared with other web applications.

If the ASP.NET compiler can compile the user control pages at runtime into
an assembly then why couldn't this be compiled and then shared with other
web applications. Perhaps we could write a module on top of ASP.NET which
could re use user controls in other web applications.

Thought?

Cheers

Matt


 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      03-05-2007
"Matt Adamson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Guys,
>
> Does anyone know the technical reason why user controls couldn't be
> compiled into an assembly and shared with other web applications.
>
> If the ASP.NET compiler can compile the user control pages at runtime into
> an assembly then why couldn't this be compiled and then shared with other
> web applications. Perhaps we could write a module on top of ASP.NET which
> could re use user controls in other web applications.


I don't think it's a technical reason, just a design reason. That's not what
user controls are for.

User controls are meant to be a simple way to build a composite control
without writing any code. They're not meant to be general purpose.

Now, at some time in the future, Microsoft could introduce a visual
composite control editor that might take the place of user controls for many
purposes, but user controls are meant to be more of a replacement for
server-side includes in ASP than they are meant to be real custom server
controls.

That said, it's not that difficult to write a composite control which is the
equivalent of a given user control. It takes longer and requires more
knowledge of controls, but it's not very difficult.

John


 
Reply With Quote
 
 
 
 
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
Guest
Posts: n/a
 
      03-09-2007
That's what Custom controls are for. Custom controls have great
reusability, but they're kinda hard to make.
User controls are only reusable within a single project but they are easy to
make.
Pick your poison.

Here's more info:
http://SteveOrr.net/faq/UserCustom.aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net


"Matt Adamson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Guys,
>
> Does anyone know the technical reason why user controls couldn't be
> compiled into an assembly and shared with other web applications.
>
> If the ASP.NET compiler can compile the user control pages at runtime into
> an assembly then why couldn't this be compiled and then shared with other
> web applications. Perhaps we could write a module on top of ASP.NET which
> could re use user controls in other web applications.
>
> Thought?
>
> Cheers
>
> Matt
>


 
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
IllegalBlockSizeException when .jar compiled into .NET dll javadev Java 3 11-03-2007 05:02 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
g++ compiled C++ code called from gcc compiled C code Klaus Schneider C++ 1 12-02-2004 01:44 PM
Why does Ruby use both tcl83.dll and tk83.dll (instead of just tk83.dll)? H. Simpson Ruby 4 08-03-2004 04:45 PM
msvcrt.dll, msvcirt.dll, msvcrt20.dll and msvcrt40.dll, explanation please! Snoopy NZ Computing 16 08-25-2003 12:34 PM



Advertisments