I'm using the ParseControl method in ASP.Net to render some mixed HTML and server control code which is coming from an external data source.
This is working well, however ParseControl does not seem to support inline script blocks (<% %>), and I'm wondering if there is a simple alternative or workaround for this? Here's one simple example (real world implementation is more complex):
string externalCodeString = "<div><%= DateTime.Now %></div>";
Control control = ParseControl(externalCodeString);
placeholder.Controls.Add(control);