Can't declare a usercontrol in a Class

  • Thread starter Thread starter ad
  • Start date Start date
A

ad

We can declarre a web controls in a class, like:

public class HealthClassBase: System.Web.UI.Page
{
public TextBox myTextBox;
.......


But if TUserControl is a Web UserControl.
When I declare it in a class like:

public class HealthClassBase: System.Web.UI.Page
{
public TextBox myTextBox;
Public TUserControl myUserControl..

it fail in compile time.

How can I do ?
 
hi

you should be able to do so, My bet is that you forgot to reference the
assembly:

using MyAssembly;

what is the compiler error anyway?


cheers,
 
Back
Top