A
Alex Maghen
Hi. I have created a UserControl ("MyUC"). I've put a bunch of instances of
that control on a Page ("Defaul.aspx"). The control works fine.
Now, I want to be able to use "FindControl()" from within my Default.aspx as
follows:
MyUC C = (MyUC)this.FindControl("SomeID");
When I try to run this, I get error:
"The type or namespace name 'MyUC' could not be found (are you missing a
using directive or an assembly reference?)"
This error is on that "FindControl()" line. Also, in the actual VS editor,
in the Default.aspx code, the references to the type "MyUC" *do* show up in
green and seem to be recognized. But when I run it, I get this error.
So what I'm confused about is, how do I refernce this new control type I've
created ("MyUC").
One more note: None of my files (the ASPX pages, MyUC.ascx, etc.) have
namespaces. I just created the files from within VS. Is there some default
namespace I have to use or something?
Much appreciated!
Alex
that control on a Page ("Defaul.aspx"). The control works fine.
Now, I want to be able to use "FindControl()" from within my Default.aspx as
follows:
MyUC C = (MyUC)this.FindControl("SomeID");
When I try to run this, I get error:
"The type or namespace name 'MyUC' could not be found (are you missing a
using directive or an assembly reference?)"
This error is on that "FindControl()" line. Also, in the actual VS editor,
in the Default.aspx code, the references to the type "MyUC" *do* show up in
green and seem to be recognized. But when I run it, I get this error.
So what I'm confused about is, how do I refernce this new control type I've
created ("MyUC").
One more note: None of my files (the ASPX pages, MyUC.ascx, etc.) have
namespaces. I just created the files from within VS. Is there some default
namespace I have to use or something?
Much appreciated!
Alex