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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top