Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting an error message

Status
Not open for further replies.

AnthonyJ20

Programmer
Aug 24, 2005
32
US
Hello, I hope someone can point me in the right direction. I'm in the process of learning how to use ASP.Net. Currently I have a web application that's all ASP. I'd like to port it over to .Net but I'm have some problems. For example, I'm getting this error when I try to view a .Net page that I created.

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.WebForm1'.

Source Error:


Line 1: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1"%>
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Line 3: <html>


Source File: c:\inetpub\ Line: 1


Here is the web form I made using Visual Studio.Net.



<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema content=" </head>
<body MS_POSITIONING="GridLayout">

<form id="Form1" method="post" runat="server">

Name: <input title="text" runat="server">
<p> Profession:
<Select runat="server">
<Option>Database Admin</Option>
<Option>Billing Analyst</Option>
<Option>Financial Analyst</Option>
</select>
<input type="submit" value="Save" runat="server">
</form>

</body>
</html>


It works perfectly when I preview it in Visual Studio. What do I need to do to make this work in the directory?
 
does the codebehind exist? - WebForm1.aspx.vb
If so is there a - Public Class WebApplication1.WebForm1 - statement below the declarations?

You could also try ...

<%@ Page Language="vb" debug=true AutoEventWireup="false" src="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1"%>

Whatever your Public Class is called should be name of Inherits= section. I dont use VStudio, i use Visual Web Developer (same concepts), have you complied your project?

Let us know.
 
Thanks for the response. I did see those files in the WebApplication1 directory. Here is the code to the .vb file. What do I need to edit in this file?



WebForm1.aspx.vb

Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub

End Class

 
Nothing...
This should get u running...

<%@ Page Language="vb" debug=true AutoEventWireup="false" src="WebForm1.aspx.vb" Inherits="WebForm1" %>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top