If I remove that I get Error
The 'CodeFile' attribute cannot be used without an 'Inherits' attribute. C:\Documents and Settings\dschinkel\My Documents\Visual Studio 2005\WebSites\WebSite1\Pro
Main Topics
Browse All TopicsI don't know why my aspx page is having trouble communicating to the code behind class. I just uploaded my project to my new server, created a virtual directory to point to that directory and get this:
Parser Error Message: Could not load type '_Default'.
Source Error:
Line 1: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Processor.aspx.v
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
My aspx:
-------------
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Processor.aspx.v
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtm
<html xmlns="http://www.w3.org/1
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:button
id="contact_submitted"
onclick="Run_Process"
runat="server"
cssclass="submitbutton"
Text="Click here to start Processing"
PostBackUrl="">
</asp:button>
</div>
</form>
</body>
</html>
My code behind:
--------------------
Imports System.Data.SqlClient
Partial Class _Default
Inherits System.Web.UI.Page
Public Sub Run_EBN_Process(ByVal sender As Object, ByVal e As System.EventArgs)
Dim sConn As SqlConnection = New SqlConnection(System.Confi
Dim cmd = New SqlCommand("sp_start_job",
cmd.CommandType = Data.CommandType.StoredPro
cmd.Parameters.Add("@job_n
sConn.Open()
cmd.ExecuteNonQuery()
sConn.Close()
End Sub
End Class
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Warning 1 Attribute 'Codebehind' in the @ Page directive is no longer supported. Convert this page to the new code-behind model by opening the Web site (project) containing the page in Visual Web Developer. C:\Documents and Settings\dschinkel\My Documents\Visual Studio 2005\WebSites\WebSite1\EBN
I am using ASP.NET 2.0
Also try configuring your application for your ASP.NET version and then re-build the application. It should work
http://msdn.microsoft.com/
Business Accounts
Answer for Membership
by: YZlatPosted on 2006-01-03 at 11:45:00ID: 15601682
simply get rid of "Inherits="_Default"
b" %>
change your first line to
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Processor.aspx.v