I found a way to “bind” objects to a web user control so that you don’t have to do this:
Address a = new Address(….); This.txtLine1.Text = a.Line1; This.txtLine2.Text = a.Line2;
UserControl.LoadData(a);
Then in the user control you have this: Public void LoadData(Address a) { FormBinding.BindObjectToControls(a,this); }
I’ve used this in two separate projects and it has worked very well. If you combine it with code generation then you really realize some definite time savings with little (if any) performance penalty. See the link for the article for more info.