سؤال

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