Forum Moderators: open

Message Too Old, No Replies

ASP.NET: Loading ascx files created at runtime

         

thumper

12:00 am on Oct 30, 2004 (gmt 0)

10+ Year Member



I use a PlaceHolder on an aspx-file that I load controls into using myPlaceHolder.Controls.Add( LoadControl("something.ascx"));

I want to be able to generate new ascx/ascx.cs files runtime and use them directly. I've written the code to output these files, but when I try to load them I get an error saying "Could not load type: myNameSpace..." on line 1 in my newly created ascx-file (<%@ Control ...).

I'm sure that the outputted code is correct, because if I load it into my VisualStudio project and build it, it works fine. So my question is, how do I get IIS to recognize and compile the ascx/ascx.cs files created at runtime?

jfelt521

4:32 pm on Nov 1, 2004 (gmt 0)

10+ Year Member



Try this:
[codeproject.com...]