Basically I want to be able to have a custom control:
public class MyControl : WebControl
{
private string html;
public string Html
{
get { return html; }
set { html = value; }
}
}
And then in an ASPX page use it like this:
<tag:MyControl runat="server">
<div>
<span>Some Text</span>
<button>Do Something</button>
</div>
</tag:MyControl>
And then the HTML that is inside the tag:MyControl start and close tags is put into the HTML property of the control.
Is this possible? I'm sure it is, I just don't have a whole lot of experience with custom ASP.Net controls.