Groups | Blog | Home
all groups > asp.net webcontrols > july 2003 >

asp.net webcontrols : Multiple controls, same name


Michael Tissington
7/13/2003 8:50:07 PM
I have created multiple controls with the same name but in different
namespaces (each one in a different folder)

I now need to reference these controls on a single web page but when I try
to browse the page I get errors saying the the control is defined more than
once.

How do I make each reference specific?

This is what I have at the moment

<@ Register TagPrefix="uc1" TagName="Test1" Src="/Test1/Description.ascx"
%>
<@ Register TagPrefix="uc1" TagName="Test2" Src="/Test2/Description.ascx"
%>
<@ Register TagPrefix="uc1" TagName="Test3" Src="/Test3/Description.ascx"
%>

--
Michael Tissington
Oaklodge Technologies
http://www.oaklodge.com/technology


Victor Garcia Aprea [MVP]
7/15/2003 2:01:50 AM
Hi Michael,

What you're seeing is okay and it has to do with the way the parser generate
implicit class names. You could use the ClassName attribute in the @Control
directive of your .ascx to avoid having duplicate names.

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.

[quoted text, click to view]

AddThis Social Bookmark Button