The opinions expressed herein are my own personal opinions and do not represent
my employer's view in any way.
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):
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/pagerdatasourceMain site: http://www.manuelabadia.com/
I hope you find the control useful…