Generating ASP.NET Code From Code
Does anyone have any insight on how to systematically generate ASP.NET code for WebControls objects?
I would love the ability to take the following following
Then have a function that would generate:
Dim lblTest As New Label
lblTest.ID = "lblTest"
lblTest.Text = "Some Text Here"
lblTest.CssClass = "myCSSClass"
I know I can make the function output the desired result, but it just seems like there would be functionality similar to RendorControl() but instead of generating the HTML it would generate the ASP.NET.
<asp:Label id="lblTest" runat="server" CssClass="myCSSClass" Text="Some Text Here" />
--Insert Clever Signature--