P. 1
Debug ASP

Debug ASP

|Views: 228|Likes:
Published by Raghunath Chandran

More info:

Published by: Raghunath Chandran on Aug 08, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





IN PREVIOUS VERSIONS OF ASP, IF YOU wanted to encapsulate sections of user
interface code, you had limited options. You could use an include file, but there was
no way to customize each “instance” of the code section.You could package the user
interface code into a COM object and call one of its methods to display it, but that
meant that you had to recompile the COM object each time you wanted to make a
change. You could use a library of functions in script file includes, but this approach
wasted a lot of web server resources because, most of the time, your page uses only
a small subsection of the code in each include file.

In ASP.NET, User Controls solve this dilemma. User Controls are designed to give
you the best of all worlds: encapsulation, optimized memory usage, compiled code,
and the capability to make changes on the fly. With any aspect of programming,
however, difficulties can emerge; this chapter deals with these difficulties. To make
sure that we cover everything, the examples in this chapter follow the creation of a
User Control and an ASP.NET page that consumes it from start to finish. Along the
way, we’ll expose some of the nuances, technicalities, and omissions that crop up
with User Controls.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->