Parser Error Message: Could not load type '_Default'.

Discussion in 'ASP.NET 2.0' started by ooc2000com0, Jan 25, 2007.

  1. Thank you wisemx. My page never explicitly refers to Default.aspx.vb

     
  2. Hello all,

    I'm a Java guy, very very new to .NET. I tried one of the MSDN tutorials, and it generated
    a simple Web app. When I publish it to my discountasp.net, I get the following error:

     
  3. With CodeBehind Visual Studio handles the underlying relationship but an FTP program, even Dreamweaver, will not know the relationship.


    If this becomes a problem for you at all you do not need to use the CodeBehind method, it's just a matter of preference.
     
  4. This line...

    <%@PageLanguage="VB"AutoEventWireup="false"Inherits="_Default"%>

    Should look like this...

    <%@PageLanguage="VB"AutoEventWireup="false"%>

    or this...

    <%@PageLanguage="VB"AutoEventWireup="false" CodeFile="default.aspx.vb"Inherits="_Default"%>


    You are attempting to inertit something (_default) from nothing... which won't work.


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  5. no, this is not true. if you want to reference default.aspx.vb, you must declare it in the CodeFile attribute.


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  6. Makes sense. This is an older issue that I'm revisiting. I wonder if the CodeFile attribute
    was there initially, and I earlier tried to delete it as a way of solving the issue. That would
    mean I'm wrong, about the code being boilerplate -- maybe it started out that way but I
    edited it. Let's go with that.

    Thanks very much Joel,
    OOC
     
  7. If the page is inheriting a partial class it would like to know where to find it, i.e. the CodeFile ref.:
    CodeFile="Default.aspx.vb" Inherits="_Default"
     
  8. Good explanation. Sounds like it wouldn't be a problem, once you know to look for it.

    Thanks!
    OOC

     

Share This Page