interface alteration

N

nate

In Dino Esp... book he talks about how user controls are the way to replace
the old file include method. Then he goes on to say that if it is a large
site it becomes a problem because every time that you change the interface of
that control you will have to recompile all the pages that reference that
control.

I am pretty new with the asp.net env. and haven't built any controls that
way yet but would like to know what the reality of this senario is and what
is the alternative method if not using a user control.
Is "user control" the correct term? Don't have his book, I just read as much
as I can while at Borders Bookstore.
 
N

Nathan Sokalski

Well, first of all, even though what he says about "needing to recompile all
pages that reference that control" is technically true, that is not as much
of a hassle as it sounds like. This is because a Solution is divided into
Projects, and each project is compiled separately (1 Project is compiled
into 1 *.dll). Because when making a control it is usually put in the same
Project as the pages that use it, you will normally end up recompiling the
pages that use it at the same time you compile the control. If you do end up
making a control that is not in the same project as the pages that use it,
or if you have multiple projects that use the same control, you can either
compile the entire Solution (this is the same as compiling all your
projects) or individually compile the Projects that use the control. How
many Projects you have will depend on how many different areas your site
has. It is possible to do a large site with just one Project, but it is not
usually recommended if you have areas of your site that are unrelated. But
since all the *.dll files go in the same directory on the web server anyway,
what I usually do if a control is used by more than one Project is compile
the solution and upload all the *.dll's, it only takes a couple minutes
anyway. You will find this easier to understand once you've been using
ASP.NET a little longer. Good Luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top