Author: ChrisOB | Posted on: 9/13/2007 1:36:02 PM | Views : 414

I have an ASP.NET website. In its root directory, there is a "controls" subdirectory containing Web User Controls (.ascx files). I cannot move these files from this directory into the root directory's App_Code subdirectory. I also have a master page in the root directory.

From the master page's codebehind, I want to dynamically create one of the Web User Controls called "bar." This "bar" control is defined in a namespace "foo" in its codebehind, and in its HTML source with a directive like so:

<%@ Control ClassName="foo.bar" Inherits="foo.bar" Language="C#" AutoEventWireup="true" CodeFile="bar.ascx.cs" %>

Now, the problem is, when I type in "foo" in the codebehind on the master page, the "bar" class that represents the control does not appear. Classes in the "foo" namespace that are located in the App_Code directory ap ...

Go to the complete details ...