User Control Property Question

Jvlaple

New Member
When building a user control, I've exposed properties in the following method:<BR><BR>User Control has (basically):<BR><script runat=server><BR>Public Text as String = "This is my text"<BR></script><BR>...<BR>...<BR><form runat=server><BR><%=Text%><BR></form><BR><BR>And to call the control and pass a property from an *.aspx page, I just @Register it, and then do something like:<BR><MyControl:Control1 Text="This is my new text." /><BR><BR>Here is my question - I've seen controls that work something like this instead:<BR><BR><MyControl:Control1><BR> <Text><BR> This is my Text.<BR> </Text><BR> <Footer><BR> This is my footer.<BR> </Footer><BR></MyControl:Control1><BR><BR>How does this work? I tried using this on my user control, and it tells me that there is no property called "Text" (for example). How do expose properties that can be set using the above format, so I can create a control that uses templates like the datagrid?<BR><BR>I hope my question is clear! :)
 
Back
Top