Last post Jan 23, 2008 05:31 PM by snives
Dec 07, 2006 07:46 PM|hotdog23|LINK
I'm trying to build a user control that i can drop onto a page and fill with custom content.
I want it to essentially be a template for which i can set a title property and then fill.
I want the code to look something like this:
<uc1:myControl ID="mc1" runat="server" Title="THE TITLE">
blah blah blah content......
I want to fill a placeholder in the usercontrol with any content written inside its tags.
Is this possible?
user control content
Dec 07, 2006 09:57 PM|DMW|LINK
I think that you'd be better off by deriving a custom control (say derived from Panel or another container control), and then simply add a public Title property and override the content rendering methods to emit the Title in whatever way that you want (i.e.
to spit out the Title as appropriate markup).
User controls are not really designed to act as composite controls.
Dec 08, 2006 01:58 AM|guenavan|LINK
Dec 12, 2006 05:12 AM|alex.galie|LINK
Jan 23, 2008 05:31 PM|snives|LINK
I'm still interested in seeing how to build a complex user control that I can access inner-properties, like the following example..
<uc1:MyControl Id="MyControl1" runat="Server">
<Item Role="Lead" Location="Ft.Worth">Rogers</Item>
<Item Role="PM" Location="New Jersey">Johnson</Item>
Complex User Control Properties