using user controls in class file

G

Guest

Hi
I would like to define an instance of a user control, which is in a separate
assembly, in a class file I am trying to build, how can I do this, please?

I am getting compilation error, saying "missing using directive or an
assembly reference", but I have already included the "using ..." directive.

I have also tried using the /reference option when compiling, but I get
"CS0006 metadata file can not be found", in fact all the files are under the
same development directory, say c:\dev\asp.net.

Any idea?

TIA

--
 
G

Guest

Hi
I add the file extension to the /reference and CS0006 is gone, but CS0234 -
missing assembly and the CS0246 are still there, please help?!

TIA
 
L

lisa

dl said:
Hi
I would like to define an instance of a user control, which is in a separate
assembly, in a class file I am trying to build, how can I do this, please?

I am getting compilation error, saying "missing using directive or an
assembly reference", but I have already included the "using ..."
directive.

Sometimes that isn't enough. Are you using VS.NET? If so, go to the
references under the project name and add the usercontrol there.

Lisa
 
G

Guest

Thanks
I somehow got it fixed by changing the instance declaration to "public". Of
course, I also had the /reference option when compiling.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top