开发者

Asp.Net - User control with text between blocks

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开发者_Python百科 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜