views:

31

answers:

1

Hello all,

I want to create a usercontrol that behaves like the Label usercontrol or the HyperLink usercontrol.

What I mean - the Label usercontrol has the Text attribute, and the text can also be set with the following way:

<asp:Label runat="server" id="lblTest">Text Here</asp:Label>

If I wish to create a usercontrol that can set the text between blocks to the actual Text attribute of the control.

Do I need to use Templated UserControl? If no - what is the correct way?

Thanks all.

A: 

I would create a simple custom control with the text attribute exposed as a property :-)

http://msdn.microsoft.com/en-us/library/aa310915%28VS.71%29.aspx

IrishChieftain