[thelist] Dynamic User Controls (or: I need Server.Execute)

Casey Crookston casey at thecrookstons.com
Thu Oct 28 15:17:20 CDT 2004


Yes, it's me again <groan>.  I need to do in ASP.NET what server.execute
could do in classic .asp.  We're all familiar with user controls:

<%@ Register TagPrefix="insert" TagName="header" Src="content/one.ascx" %>

and then in the content:

<insert:header id="myControlID" runat="server"/>

But, what if the name of the file to include is dynamic.  For example, on
the previous page a user has the option of two links:

edit.aspx?page=one

or

edit.aspx?page=two

Depending on the link, then the name of the .ascx file would change to "one"
or "two".

Thanks is advance!!

Casey




More information about the thelist mailing list