Question

I am asking this as there are many ways of populating a data control (like GridView and FormsView) and it can get overwhelming for a new developer.

What's the best approach?

Should data source controls (like SqlDataSource and ObjectDataSource) be avoided altogether?

Was it helpful?

Solution

I'd say SqlDataSource is not very appropiated for n-layered applications (except n = 1) since it talks directly to sql server.

On the other hand, ObjectDataSource is a perfectly acceptable option since allows you to call methods from classes on any of the layers the web layer has access to. It won't restrict your layers architecture at all.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top