By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,125 Members | 1,411 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,125 IT Pros & Developers. It's quick & easy.

Unable to cast object of type 'ASP.' to type ''

P: n/a
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 follows:

((StyleSheetProvider)this.Page).GetStyleSheetPath( );

Is there some different way of typecasting that needs to be done in
vs2005? Thanks in advance.

Unable to cast object of type 'ASP.Feedback' to type
'JermLib.StyleSheetProvider'.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Unable to cast object
of type 'ASP.Feedback' to type 'JermLib.StyleSheetProvider'.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidCastException: Unable to cast object of type 'ASP.Feedback' to
type 'JermLib.StyleSheetProvider'.]
JermLib.CustomControls.StyleSheetLink.OnPreRender( EventArgs e) +107
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1360

Apr 11 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.