First application problems with parsing...

SAD

Member
Joined
Aug 29, 2007
Messages
15
Programming Experience
Beginner
Hi

New to VB.net and just trying to create a login page and run the project to ensure that the login screen displays OK.

I have used the default page and added some text boxes and a login button - no code behind these yet, as I wanted to see what they look like on the web page but when I try running my project I get the following error:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'WebApplication1.Default'.

Source Error:


Line 1: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebApplication1.Default" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Source File: /Default.aspx Line: 1


--------------------------------------------------------------------------------

I am sure this is something really simple but I am not sure what it wants for the Inherits section...

should I create my own Login.asp page and then point the default page to inherit the new login page?

any help greatly appreciated.

Thanks

:confused:
 
the inherits part means the partial class name to inherit from
In this case "WebApplication1.Default"

means Class WebApplication1 and properties/method/public member of the webApplication1 class.

Try changing the the inherits to "WebApplication1_Default" and do the same to the code behind files, change the partial class name to "WebApplication1_Default"
 
Hi

Thanks for the response. I tried your suggestion but still got an error so i must be doing something else wrong!

However, before your reply I started again and this time chose to create a new website and then added my login screen to this (as the default page) and this does run so at least I can now start my project.

thanks anyway
 
In this case "WebApplication1.Default" means Class WebApplication1 and properties/method/public member of the webApplication1 class.
WebApplication1 is actually the namespace and Default is the class.
This is strange; when I create a new Web Application project, the Default page inherits the class _Default (notice the leading underscore) as Default is a reserve word. Actually it inherits WebApplication1._Default as Web Applications by default have a root namespace.
Here is a good website for Web Application project model tutorials: Visual Studio 2005 Web Application Project - Tutorials and Help
 
Back
Top