Wolfgang (4)
Usenet Archive
- Joined
- Jul 8, 2008
- Messages
- 4
- Reaction score
- 0
I'd like to create a rich textbox which inherits from TextBox:
public class MyTextBox : TextBox
{
protected override void Render(HtmlTextWriter writer)
{
base.Render(writer);
LinkButton button = new LinkButton;
button.Text = "Button";
button.RenderControl(writer);
}
}
But in the output produced the linkbutton is no longer a LinkButton but just plain text. If i inherit from CompositeControl everything woks find but then my testbox is no longer a TextBox.
Is there a way to make my linkbutton work and my textbox remains a TextBox?
public class MyTextBox : TextBox
{
protected override void Render(HtmlTextWriter writer)
{
base.Render(writer);
LinkButton button = new LinkButton;
button.Text = "Button";
button.RenderControl(writer);
}
}
But in the output produced the linkbutton is no longer a LinkButton but just plain text. If i inherit from CompositeControl everything woks find but then my testbox is no longer a TextBox.
Is there a way to make my linkbutton work and my textbox remains a TextBox?