Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Visual Inheritance?
Message
De
17/06/2010 15:14:59
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
17/06/2010 14:04:42
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01469439
Message ID:
01469479
Vues:
37
>>>Hi,
>>>
>>>I am designing a web page that is to add an Insurance Policy. The Policy can have three different people associated with it: the Insured, the Owner and the Payor. The details for each of these is exactly the same so I want to create a standard interface for a "Person", then drop it 3 times on my ASP page and set each one to be bound to different data.
>>>
>>>Is this possible? Or is there another way that I am supposed to be thinking?
>>
>>Very possible and I do it often. What you want to create is a "WebUserControl" and put all the controls you want on there. Call it say "ctrlContact". Then on your ASP.net form you can add this control as many times as you want. You will probably need to add a property or two to that control to allow you to set the binding sources at runtime differently.
>>Tim
>
>OK, that is what I was looking at doing, but couldn't work out how the binding would work. I'll hold off on this until I have my other question on the multiple BOs sorted out as this would be the interface for those objects.
>
>Thanks

My way of doing this would be to expose a method in the control or a constructor that woudl accept an enum value for the type of data it should display. Each control would retrieve it's own data based on the value of the record you are on. I suppose if the control is just showing the data for a person, then you could just instantiate the control passing in the person ID and it would go get that. Each copy of the control would create it's own copy of the business object so the data would be seprated.
Tim
Timothy Bryan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform