Chapter 33. Building Templated Databound Controls


In this Chapter

  • Creating Templated Controls

  • Creating Templated Databound Controls

  • Summary

The ASP.NET Framework is a framework. If you don't like anything about the framework, you always have the option of extending it. In particular, if you discover that the standard databound controls in the framework don't do everything you need, you can create a custom databound control.

In this chapter, you learn how to create custom controls that work like the ASP.NET 2.0 GridView, DetailsView, and FormView controls. In the first part of this chapter, you learn how to create controls that support templates. You learn how to implement controls that support both standard templates and two-way databinding templates. You also learn how to supply a control with a default template.

The last part of this chapter is devoted to the topic of databound controls. You learn about the new base control classes included in the framework that were supplied to make it easier to create custom databound controls. We also create several custom databound controls. For example, at the end of this chapter, we create a custom FormView control that uses AJAX to insert and update database records from the client.




ASP. NET 2.0 Unleashed
ASP.NET 2.0 Unleashed
ISBN: 0672328232
EAN: 2147483647
Year: 2006
Pages: 276

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