Summary


In this chapter, we've examined how to develop ASP.NET server controls using C# and VB. There are many topics, such as advanced state management, that we've not covered in this chapter but we've hopefully given you enough information to start developing server controls.

We started the chapter by looking at how to develop a really elementary server control with a hardcoded user interface. We then evolved this into a more useful label control supporting attributes to allow the text content of a label to be specified, along with server style attributes to define font size and text control.

Then you saw how the WebControl class is designed for server controls that require styles and also want to provide an object model consistent with the built-in ASP.NET server controls. Next you saw how server controls can interact with postback and use viewstate to become intelligent “automatically round-tripping their values in the browser, and raising events to allow server-side event handlers to react to changes in state.

You also saw several miscellaneous topics, including how to use attributes to influence the design-time experience of a server control, and how to determine the capabilities of a browser to enable a control's user interface to be adaptive. Finally, we looked at some of the reasons why you might want to write server controls in preference to user controls or plain ASP.NET pages.

The next chapter deals with exposing web services, allowing you to share information across networks and the Internet.




Professional ASP. NET 1.1
Professional ASP.NET MVC 1.0 (Wrox Programmer to Programmer)
ISBN: 0470384611
EAN: 2147483647
Year: 2006
Pages: 243

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net