How do I add a web user control to a namespace

D

Don

I want to create two web user controls with the same name but in
differetn namespaces. How do I do this?

I've added the namespace to the code behind and updated the ascx files
to inherit from the code behind file in the correct namespace.

I don't know what to add to the ascx file to signify that it is part of
this tablespace. Do I need to do anything?

My problems seem to occur when I put the two control on the same page.
 
W

WJ

Don said:
I want to create two web user controls with the same name but in
differetn namespaces. How do I do this?

If you are using VS.Net IDE, just open a new web project under the same
solution and add as many Web User Controls as you want.
My problems seem to occur when I put the two control on the same page.

Make sure you qualify the controls with their correct namespaces. Example:
ns1.MyUserCtrl and ns2.MyUserCtrl. Same names can be used as long as they
donot appear on the same project under a given solution.

John
 
D

Don

Thanks for the response but I don't think you understood my problem.
I'm adding the web user control (ascx extension) to my project. My
question is how do I assign the put the controls in a namespace. I add
the namespace directive to the code behind but don't knoe what to do to
the page.
I have 2 controls named search in different namespaces. When I put
both of these controls on the same page I get an error saying that the
name search is ambiguous.
 

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

Top