473,508 Members | 3,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ambigous reference when loading ascx control

1 New Member
I migrated my project from VS 2003 to VS 2005. The application runs ok with a few exceptions, one being an ambigoius reference when loading a form. My application uses its own "master page" technique, where the ASPX form is static, and the body of the screen is loaded as an ascx file. One particular ascx file throws an exception when I try and load it. The error is "ambigous reference".

I have tried everything I can think of to resolve this, including renaming the file, and various other things. There is no other control or form with a similar reference.

I have other forms in the application that are constructed similarly, and they work fine.

Any ideas greatly appreciated!
Jan 22 '07 #1
2 1337
radcaesar
759 Recognized Expert Contributor
There must be some objects which has invalid reference. Try to find it by Line by line debugging (Using F11).

:)

I migrated my project from VS 2003 to VS 2005. The application runs ok with a few exceptions, one being an ambigoius reference when loading a form. My application uses its own "master page" technique, where the ASPX form is static, and the body of the screen is loaded as an ascx file. One particular ascx file throws an exception when I try and load it. The error is "ambigous reference".

I have tried everything I can think of to resolve this, including renaming the file, and various other things. There is no other control or form with a similar reference.

I have other forms in the application that are constructed similarly, and they work fine.

Any ideas greatly appreciated!
Jan 22 '07 #2
kenobewan
4,871 Recognized Expert Specialist
Unfortunately in 1.1 you could use same named methods - but in 2.0 anything that has a method name that appears in multiple assemblies (.Net or custom code) will result in the error you listed. Consequently, you may have to use HtmlTextBoxControls.ButtonType instead of just ButtonType previously...

Hope that this helps.
Jan 23 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
3480
by: dh | last post by:
As a simple example, I can't seem to be able to reference a label called "lblOutput" that exists in my test.aspx page from within a User control, TestControl.ascx. I am stumped. Any help is...
1
3006
by: Martine | last post by:
Hi there! I have a problem with programmatically adding user controls to my mobile webforms. If I load my usercontrol programmatically (in the Page_Load), the object is instantiated, I have...
1
2065
by: Pattabi | last post by:
Hi!!!!!!! I have aspx page which uses ascx(usercontrol) in it. The ascx in turn contains a textbox and a button. if i click the button, javascript code get executed to open another popup window,...
9
2157
by: Moe Sizlak | last post by:
Hi There, I am trying to write the selected value of a listcontrol when a button is clicked and I keep getting the error "object not set to a reference of an object". The libox itself is in a...
6
6102
by: blash | last post by:
Can someone help me? I really don't have a clue. My company staff told me they often got such error: "Object reference not set to an instance of an object." when they are in search result page...
7
3176
by: Samuel | last post by:
Hi, I am building a page that makes use of user control as a templating technique. The following is that I have in mind and it is actually working: Root/ -- login.aspx -- login.aspx.vb --...
2
1695
by: Vivek Sharma | last post by:
Hi There, I have a situation where I wish to load the controls dynamically on the basis of user role. Hence, I am using this code. if (UserRole == "IS Administrator") { Control UC1 =...
3
1540
by: Wouter | last post by:
Hi All, I am loading a web user control (.NET 2.0) into a placeholder on a content page ( plus the use of a master page). The controls is a list of companie, one you select a company for...
2
1208
by: Brian Lowe | last post by:
I'm trying to add the content of a user control dynamically at run time, dependent upon some request attribute. My user control is a simple tell-tall so I'm sure that's not spoiling anything....
0
7332
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
426
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.