I've been asked to implement a means of storing simple .ASCX controls in a database table and loading them dynamically into a page on a web app. I've successfully done this using the code presented here:
http://support.microsoft.com/kb/910441 , where the DBUtility class is set up to query the database where the controls are stored. With a user control defined this way:
<%@ Control Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.UserControl" %>
<script runat="server">
protected void Page_Load(Object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
txtTest.Text = "Button one pressed";
}
protected void Button2_Click(object sender, EventArgs e)
{
txtTest.Text = "Button two press ...
Go to the complete details ...