Hi.
I want to have a LinkButton that adds 'span' tag around the text.
protected override void Render(HtmlTextWriter writer)
{
Text = String.Concat("<span>", Text, "</span>");
base.Render(writer);
}
It's works perfectly, but only if I add text like this:
<cc:TestLinkButton ID="TestLinkButton" runat="server" Text="SomeText">
</cc:TestLinkButton>
If I want to add some image I will write something like this:
<cc:TestLinkButton ID="LinkButton1" runat="server">
<asp:Image ID="Image1" runat="server" ImageUrl="~/Images/icon_holiday.png" BorderWidth="0" />
SomeText
</cc:TestLinkButton>
In this case Text property will be empty, because actualy "SomeText" is child control property.
So question is is how to add tag around child controls.