Love and Hate for ASP.NET 2.0 Beta 1

March 30th, 2005

I have been working on this project for nearly a month and I have taken advantage of the Membership and Personalization features in ASP.NET 2.0. I am also using the new DataObject attributes to tag objects and methods for use with ObjectDatasources. It is all very helpful within Visual Studio.NET 2005 as it helps me identify the objects I plan to use as I get passed the persistence layer and into the web forms. Of course not everything is working perfectly.

In ASP.NET the ViewState is really powerful... at least when it works. I am using the old Repeater Control on some screens and I can attach a DataSource and bind it to the control so that it displays each item on the page, but when I place a Button on the page with each item I have had difficulty with getting it to return a populated DataItem and CommandArgument when the button is clicked. It feels like ViewState is not actually retaining state. I chock that up to the Beta 1 status of .NET 2.0. And some of this could be caused by my use of Generics as the Datasource.

Anytime now Beta 2 should be out. Once it is I hope to watch the Log4Net logs closely to see what changes, if any, take place. I really, really want the Datasource and DataItem values to be retained for the Repeater Control. It just has to. Otherwise I may as well just disable ViewState. As it is now I have to populate the repeater on Page_Load regardless of IsPostBack. Normally in ASP.NET 1.1 that is not necessary.

To get around the DataItem and CommandArgument problem I simply handle the ItemCreated event and populate them manually. I find that reduces my productivity with each page which requires it, but at least I can get it to work.

Tonight I will be working on a project back in 1.1 land, so I will run some tests to verify that 1.1 really does work the way I expect. I have normally only used DataGrids, so I should account for the fact I am not very familiar with the Repeater Control. Regardless, the DataSource should remain populated.

Comments are closed.