Last post Apr 27, 2011 10:24 PM by Small Peter
Apr 27, 2011 08:50 PM|markramel|LINK
Is it possible to make a class library that contains a linq to sql datasource which can then be used to populate say a dropdownlist control in two different web application on the same solution/project?
I am planning have two websites which is part of a solution to use the same content like country to populate a dropdownlist control on their respective appliction. Although these sites may vary from its development. Just a though from this http://www.asp.net/general/videos/how-do-i-extend-and-customize-an-aspnet-server-control-for-a-specific-purpose
which saw two sites sharing one class that contains a dropdown control.
Any ideas from you guys, please point me to the right direction. Thank you!
Apr 27, 2011 10:24 PM|Small Peter|LINK
Yes of course you can. It's kinda like a service-based N-tier system. You write a few classes in a library project as the repository to organize and provide data to upper level applications which are your websites. Then in your websites, you only need to
access your custom libarary to obtain data without knowing how data is stored in a database.