asp.net mvc - Design: Product Treeview shared among several controllers -
i have product treeview referenced in multiple views , controller. treeview items of product treeview loaded dynamically using ajax , public action method.
should move product treeview's logic , public action method shared controller such sharedcontroller? recommend?
burnt1ce,
as ever, depends... if use via ajax (jquery or msajax?? [not matters much, allow add appropriate tag question]), tempted refactor out html.helper few overloads allow different product models loaded. (i recommend using product interfaces, rather concrete classes allow variety of product sub-classes if required)...
if ever need load in context of view, keep , load via html.renderaction() method.
this initial thoughts.
Comments
Post a Comment