can't reference page anymore?

D

David Lozzi

howdy,

using the postbackurl of a button to send data to another page. This script
was working fine but now blamo


Server Error in '/newcartApplication.
--------------------------------------------------------------------------------

Unable to cast object of type 'ASP.productdetail_aspx' to type
'productdetail'.
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.productdetail_aspx' to type 'productdetail'.

Source Error:

Line 37: Else
Line 38: Dim prev As New productdetail
Line 39: prev = CType(Page.PreviousPage, productdetail)
Line 40: partno = prev.PartNo
Line 41: name = prev.Name

Source File: c:\inetpub\wwwroot\newcart\addtobag.aspx.vb Line: 39


In the code-behind, the productdetail is underline blue and reporting type
'productdetail' is not defined. When I go to that page, in the ASPX file,
the <%@ Page ... %> is underlined blue reporting type
ASP.common_user_control.ascx is not defined. So its complaining about my
user controls, I checked them out and they all appear to be fine, and again,
I didnt touch these files. When I compile my project I get a few errors
pertaining to the above and "Error 1 could not find library
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\newcart\bea62603\9c73a00a\App_Web_pr6xm09i.dll' vbc : Command line
"
Any ideas?

I'm going to bed, 2AM EST.... Thanks!!
 
G

Guest

David,
Try deleting the temporay files for you application in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

you'll need to close your devenv and seeing that your runing through IIS
stop IIS or kill the aspnet process to release any locks on the temp files.

Bring up the devenv and recompile your web site.

I find that this correct many strange issues that I have during development,
I think its something to do with the temp files getting out of sync. You can
also try the 'Clean Solution' option before rebuilding.

Garth.
 

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

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top