Renamed aspx file in VS .NET 2005, now won't build

B

Brent White

The aspx file was originally default.aspx, but I'm putting some other
aspx files in that same virtual directory and I want to give it a more
meaningful name. I renamed default.aspx in the IDE to
CorporateSelectStates.aspx, and the file default.aspx.vb was renamed to
CorporateSelectStates.aspx.vb.

Now when I try to build, I get an error saying "The file
/CrystalReportsWebApplication1/Default.aspx.vb does not exist"

It refers to line 1 of the aspx file, but this is the aspx file in its
entirety (it's not a lot of code):

<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="CorporateSelectStates.aspx.vb" Inherits="_Default" %>
<%@ Register TagPrefix="CR" Namespace="CrystalDecisions.Web"
Assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Corporate Customer List</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
<asp:Button ID="Button1" runat="server" Text="Button" /><br />
<br />
<br />
<br />
<br />
<CR:CrystalReportViewer ID="CrystalReportViewer1"
Runat="server" AutoDataBind="True"
Height="815px" CssFilename="/css/default.css"
ReportSourceID="CrystalReportSource2" Width="1200px"
PrintMode="ActiveX" />
<CR:CrystalReportSource ID="CrystalReportSource2"
runat="server" GroupPath="">
<Report FileName="CorporateCustomerListSelectState.rpt">
</Report>
</CR:CrystalReportSource>
</div>


</form>
</body>
</html>


There is a class "_default" in the aspx.vb file, so I knwo it's not
that. What did I do wrong or is this a bug in VS .NET 2005?
 
J

Juan T. Llibre

That's what happens when you inherit from a non-existing object.

Replace all instances of "Default" with "CorporateSelectStates"
in both the aspx *and* in the codebehind, and it will compile OK.

That would include renaming "_Default" to "_CorporateSelectStates"
 
G

Guadala Harry

<< I probably would have done that eventually anyway >>

What's that supposed to mean?
 

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,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top