473,324 Members | 2,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

How do I add a web user control to a namespace

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.

Nov 19 '05 #1
2 2408
WJ

"Don" <ch*********@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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
Nov 19 '05 #2
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.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Vivek Sharma | last post by:
Hi, I have created a dropdownlist as a web user control. I am using its multiple instances on the webpage. How do I access the selectedValue of each instance? All the instances have different...
6
by: Tom Rowton | last post by:
This one has me a bit confused and I'm not finding what I need in the MSDN or by searching these forums, so here goes... I have a rather large, complex code-in-page WebForm (don't ask) and a...
5
by: Marcel Gelijk | last post by:
Hi, I am trying to create a User Control that is located in a seperate class library. The User Control contains a textbox and a button. The page generates an exception when it tries to access...
4
by: DotNetJunkies User | last post by:
I have created a User Control (a Pareto Chart) using C#. It works great in .Net Windows Apps, but I also need to use it in a Web Application (to view in IE). Everything I read on this seems to be...
12
by: Phil Certain | last post by:
Hi, I'm trying to do something very simple...or at least it should be. I have created a host page (gen.aspx) and a very simple user control (us.ascx). The corresponding code-behind files are...
2
by: tshad | last post by:
This is related to my other Hiding datalistitems problem that I can't seem to solve. I have tried different methods which all seem to work only partially. I decided to try to use a User...
5
by: Paul Bromley | last post by:
Can someone give me a very simple example on how to do this? As an example I have a commaned button in a user control. Once this user control is placed on a form I want to be able to respond in the...
1
by: tony | last post by:
Hello! I just want to find out how the system find the name to set on a assembly User control dll. I have done this. 1. Create a user control - Here the namespace was set by the system to...
2
by: rn5a | last post by:
Assume that a user control (MyUC.ascx) encapsulates 2 TextBoxes with the IDs 'txt1' & 'txt2' respectively. To use this user control in an ASPX page, the following Register directive will be...
2
by: User | last post by:
Hi, I have a custom user control. How do I write the script in a way which i can import custom namespace within the custom control? Please advise.. Thanks! mycontrl.ascx <script...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.