Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Server Control Questions Answered


Message #1 by "Scott Guthrie" <scottgu@m...> on Thu, 22 Mar 2001 09:39:50 -0800
Origional Question:

------------------------------------------------



seano@a... asks:



I have not yet tried out the .NET beta, but from what I have read about

about the various server-side controls I am reminded of the VBScript

library that gets created with every new VI6 project (and then

immediately

deleted by me!). 



I have found the VBScript library makes it easy to create new pages, but



it's difficult to modify and debug.  I know from conversations with

other

developers that I am not alone here.



Can you put our minds at rest?



ScottGu Answer:

------------------------------------------------



Hi Sean,



Let me put your mind to rest -- our server control architecture is very,

very, very different from the VBScript libraries that Visual Interdev

and others have tried in the past.



Some specific differences:



1) ASP.NET Server Controls are compiled components -- they *do not* emit

wads of interpreted script into your page (which hurts perf)



2) There is no deployment hit in using ASP.NET Server Controls.  You *do

not* need to worry about copying around a lot of include files



3) You declare an ASP.NET Server Control in a page simply by typing in a

tagname and setting some attribute properties.  Unlike design-time

controls found in Visual Interdev 6.0 or FrontPage, there is no

"design-tine" UI that emits loads of yuck into your page.  Instead, GUI

editors simply persist the same tag/attribute pairs that you would

otherwise type in yourself if you were using notepad.



4) ASP.NET Server Controls allow developers to set a programmatic "id"

value to a server control -- and program directly against them using a

clean Object Model (for example: I can set the background color of a

datagrid by saying: DataGrid1.BackColor =3D Red).  This dramatically

simplies and cleans up the code you need to write to create great web

UI.



5) ASP.NET Server Controls work with any browser device (IE, Netscape,

Opera) -- and also come with built-in capabilities that allow developers

to easily customize/tweak the html content emitted.  As such, there are

no limits to what the output looks like (you aren't stuck with a boring

grid control -- you can have hierarchy, rich output, etc).



For some great examples of how server controls can help, I'd recommend

checking out the ecommerce store and intranet portal samples we've

posted at: http://www.ibuyspy.com  I think they demonstrate how powerful

a construct server controls are -- as well as how clean the code to use

them ends up being.



Hope this helps,



Scott


  Return to Index