Search code examples
c#.netservercontrolsdata-access

Server control/data access best practice?


Is it better to access data from within the web parent app and pass the necessary data to the control and back via properties, or pass a reference or url pointer (of webservice) to control and let it access the data for the fields it encompasses keeping in mind that the parent doesn't need to use the data anywhere else that the server control uses.


Solution

  • I think that usually it would be easier to manage the control by the app, but in some scenarios especially when you don't need the application to access the data you can just embed the control, e.g. when you want to embed an external video player etc. or some external web-part or other frame.