ASP.NET 2.0 and Visual Studio .NET design-time experience

Daniel complained about the lack of design-time component support in VS.NET 2005 for ASP.NET.

I also think this is a big issue. In addition to the Daniel's reasons, it makes the Windows Forms and ASP.NET design-time experience completely different, and that’s even worse when working with data.

Windows Forms have a 'Data Sources Window' where you can have your custom objects or datasets, and assign default controls for them (like when you drop a 'Gender' field in a form have VS.NET to add it like a ComboBox instead of a TextField). But ASP.NET does not use it! So even if you invest a lot of time of building your DataSources window, you’ll need to start again in ASP.NET.

One of the things that are lost in ASP.NET is design time support for binding typed datasets. If you built an assembly with typed datasets and you want to bind that to a web grid, you cannot do that from the designer. You could do it in VS.NET 2003 and it as a very common scenario.

They could make that work somehow if they shipped a 'TypedDataSet DataSource' in addition to the SqlDataSource, ObjectDataSource, etc, but it seems they won't ship it. There was a 'DataSetDataSource' in Beta 1 that won't be in Beta 2, but it was not designed to bind to typed datasets, even if the name implied it.

You can make this work by building own custom DataSource that works with typed DataSets, and we'll do that, but I think is something it should ship out of the box in VS.NET.

1 Comment

  • Hi Scott,



    Thanks for your comments.



    I had two concerns in my post about working with data.



    One was that it was different in ASP.NET and Windows Forms. If I do what you suggest in an ASP.NET and Windows Forms app I get a similar design time experience but very different results. In one case I get an .XSD file with embedded SQL statements (ugh!) and in the other case a typed dataset and a typed Data Adatper. I see how I can reuse the latter in multiple project types (win, web, class libraries) but I'm not sure if I can reuse the ASP.NET one. I need to have a class library with my DataSets and another with the DataAdapters, that's the only way I can reuse my business objects in a multi-tier application.



    Anyway, the most important concern I still have about working with data is that in VS.NET 2003 it was quite common to have a project with typed DataSets and a project with classes that knew how to persist them, invoking SqlDataAdapters or hand coding SQL statements.



    So, I have a nice assembly with DataSets, and I was able to bind it in ASP.NET using the form designer. I had to write the code to load the DataSet and call .DataBind()



    In VS.NET 2005 there's no way to bind that DataSet. I don't expect you to call my components and load it, but let me bind it.



    Also, the methods that you need to configure for select/update/insert/delete operations aren't what I want. I want the grid to work on my DataSet, and then when I decide it, I want to persist the dataset in the database. I can have one dataset with several data tables that is loaded in multiple forms, and I want to save it in the last step. I don't see how I can wire that in the editors. I liked the way I was able to do it in VS.NET 2003.



    Regards,



    Andres



Comments have been disabled for this content.