문제

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