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

Discussion in 'ASP .Net' started by Brent White, Oct 28, 2005.

  1. Brent White

    Brent White Guest

    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?
     
    Brent White, Oct 28, 2005
    #1
    1. Advertising

  2. 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"



    Juan T. Llibre, ASP.NET MVP
    ASP.NET FAQ : http://asp.net.do/faq/
    Foros de ASP.NET en EspaƱol : http://asp.net.do/foros/
    ======================================
    "Brent White" <> wrote in message
    news:...
    > 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?
    >
     
    Juan T. Llibre, Oct 28, 2005
    #2
    1. Advertising

  3. Brent White

    Brent Guest

    Brent, Oct 28, 2005
    #3
  4. << I probably would have done that eventually anyway >>

    What's that supposed to mean?



    "Brent" <> wrote in message
    news:%23$...
    > Okay, that worked (I probably would have done that eventually anyway).
    >
    > --
    > Sent via .NET Newsgroups
    > http://www.dotnetnewsgroups.com
     
    Guadala Harry, Oct 28, 2005
    #4
  5. Brent White

    Brent Guest

    Brent, Oct 28, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bruce W...1

    Can a .aspx file be renamed to .htm?

    Bruce W...1, Aug 23, 2003, in forum: ASP .Net
    Replies:
    11
    Views:
    728
    MS News \(MS ILM\)
    Aug 24, 2003
  2. Mikeon
    Replies:
    2
    Views:
    367
  3. Guest
    Replies:
    6
    Views:
    14,328
    Sravani
    May 19, 2012
  4. jobs
    Replies:
    0
    Views:
    552
  5. Amarpal
    Replies:
    2
    Views:
    898
    harsha
    Dec 31, 2011
Loading...

Share This Page