Blog Home  Home Feed your aggregator (RSS 2.0)  
DataSourceControls… Non visual controls? - Manuel Abadia's ASP.NET stuff
 
# Wednesday, 07 June 2006

When I started learning ASP.NET 2.0 I noticed that the component tray was taken out of the designer and somewhat the concept of component (in ASP.NET 1.x) was obsolete and did not apply in ASP.NET 2.0.

I was very angry with the new direction taken about this when I found this post by Nikhil Kothari’s (an ASP.NET dev. team member):

http://www.nikhilk.net/NonVisualControlsAndComponents.aspx

that explains some of the problems found when implementing the new data source controls in asp.net 2.0. Even they do not render any mark-up, they need to participate in the page life cycle, so the old concept of component and the old model of persisting components in the code behind file wasn’t working for this. Anyway, I had the idea that data source controls should not appear with the rest of the controls in the page and I didn’t liked the current implementation that shows the data source controls located anywhere on the page.

Some months later, I have changed my mind and I have to congratulate Microsoft for this decision. IMHO, the best is to have an attribute that lets the designer know which control produces html output and which one doesn’t. That way the developer has the final decision and the designer doesn’t restrict developer’s imagination.

For example, I was converting to ASP.NET 2.0 an old pager I have been using in a lot of projects but when I was doing the conversion I thought: a pager has user interface but also is a data source for another control… hmm

I rewrote the control from scratch in order to see if I can come up with a pager that can act as a data source control, and finally, after sorting out very subtle problems and complex relationships with the binding infrastructure and data source controls I finally had something working. I’m very impressed with what I obtained because I was able to add paging to a control with no code at all thanks to the magic of the data source controls! I think this was a very good idea so I worked hard on making my pager a fully customizable control with a lot of features like page links that are search engine friendly and full design time support for interacting with data source controls:


I made a sample web site that shows some scenarios with the different features of the PagerDataSource and also redesigned the main website (let me know what you think about the new design). There is an evaluation version if you want to try it.

PagerDataSource Live demo: http://www.manuelabadia.com/livedemo/pagerdatasource
Main site: http://www.manuelabadia.com/

I hope you find the control useful…

Wednesday, 07 June 2006 17:33:18 (Romance Daylight Time, UTC+02:00)  #    Comments [2]   ASP.NET  |  Tracked by:
"DataSourceControls summary" (Manuel Abadia's ASP.NET stuff) [Trackback]
http://www.manuelabadia.com/blog/PermaLink,guid,7cef4a16-10ec-44e5-8f3c-36a977b8... [Pingback]
Copyright © 2018 Manuel Abadia. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.