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

H

hlyall1189

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top