473,385 Members | 1,655 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,385 software developers and data experts.

Unable to cast object of type 'asp.usercontrols_....._ascx' to type 'usercontrols_.....'

"InvalidCastException was unhandled by user code" is the title of the
error. It's related to 2 different user controls on my page that are
dynamically loaded. I've added both the Register and Reference
statements. The error comes and goes randomly. Today I'm working on
the containing page and haven't done any work in either user control.
The only way I can get the code to run successfully is to make a change
to all 4 files - the 2 user control ascx files and their corresponding
code behinds. If I make a change to just one set of files the error
occurs in the other. If I make a change to the 2nd set it tells me it
can't cast the first. Nice endless loop. What makes it worse is we're
using VSS so the files with the errors are sometimes checked out by
other users and my development effectively stops.

Makes for a painful day of coding. Please help.

Aug 2 '06 #1
1 2211
Anyone have this issue? Microsoft? Anyone?

Aug 14 '06 #2

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

Similar topics

0
by: hlyall1189 | last post by:
Hi, I recently started upgrading some of my old vs 2003 apps to vs 2005 and used the conversion tool but now i get the following error after building the page. I have typecasted the lines as...
0
by: Jeff | last post by:
Unable to cast object of type 'ASP.pgmaster_master' to type 'ASP.pgmaster_master'. I periodically get this error on VB .Net 2005 but then it will go away on it's own. I have no idea why this is...
2
by: rn5a | last post by:
Suppose I have this property in a user control (which is named Address.ascx): <script runat="server"> Public Property Caption() As Object Get Caption = lblCaption.Text End Get Set(ByVal...
0
by: BillE | last post by:
I get an intermittent error when I start a debug session for a vb.net web site which uses master/content pages: "Unable to cast object of type 'ASP.master' to type 'ASP.master'" I think this...
1
by: Chris | last post by:
Hi, I want to limit the amount of data shown in a page coming from a database. Everything works except that I get the error: "Unable to cast object of type...
1
by: epatrick | last post by:
I have a series of custom controls developed under ASP.NET 1.1, and I've successfully migrated to ASP.NET 2.0. I have also developed a custom class dervied from System.Web.UI.Page, called...
1
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I have a master page and a content page to that master. When I try to work with them I get an inconsistent error of casting ability and it happens irregularly, which means sometimes it can work...
1
by: GaryDean | last post by:
"Unable to cast object of type 'ASP.masterpage_master' to type 'MasterPage" This code has always worked but today it is getting the exception in the subject line of this post... protected void...
1
by: =?Utf-8?B?U2NvdHQ=?= | last post by:
Hello, Using VS2008 in a C# web service application, a class has been created that inherits from the ConfigurationSelection. This class file has been placed in the App_Code folder. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.