Except for the purpose of reuse if repeating for more than one webpage, do usercontrols in this model offer any other advantage?
+2
A:
They offer a way to hide complexity. You can put a complex control into the user control and not worry about the nitty gritty details when your working on the page.
I think this is a huge benefit of user controls in general.
JoshBerke
2009-04-07 19:20:09
right...easier to maintain
TStamper
2009-04-07 19:23:59
Yep controlling complexity is a key tactic in developing complex applications. Minimize what I need to worry about at any given point in time.
JoshBerke
2009-04-07 20:25:30
+1
A:
If you use them wisely, they may provide better understandability. A user control is a part of your markup. You provide a part of your model to it.
So, for e.g. if your model is a List of type A where A has a complex property B which requires a complex markup, it makes sense to use a user control U which uses A.B as its model. Your code is now simpler and if you want to change or replace ui of the B only, you just replace or modify U instead of looking for its markup in V.
Serhat Özgel
2009-04-07 19:25:29