C# custom control: Use internal content as Text field

Posted by Ed Woodcock on Stack Overflow See other posts from Stack Overflow or by Ed Woodcock
Published on 2010-05-19T16:39:11Z Indexed on 2010/05/26 18:11 UTC
Read the original article Hit count: 194

Filed under:
|

I'm creating a custom control, and I want to get all the stuff within the tags and use it as a string Text field on my control:

i.e.

<custom:control ID="C" runat="server">This text should go into the text property</custom:control>

Does anyone know how to achieve this? I've tried the following attributes on my text field (copied from the Literal control) but it doesn't seem to work!

    [DefaultValue(""), Bindable(true), Localizable(true)]

© Stack Overflow or respective owner

Related posts about c#

Related posts about custom-controls