我在视觉工作室有一个工作网站项目。我可以毫无问题地查看所有页面。
现在我从另一个 Web 应用程序项目中复制了 2 个文件:search.aspx search.aspx.vb
search.aspx 源代码片段
<%@ Page EnableViewState="true" EnableEventValidation="false" MetaDescription="<%$Resources:metadescription%>" Title="<%$Resources:pagetitle %>" Language="VB" MasterPageFile="~/main.master" AutoEventWireup="false" Inherits="search" Codebehind="search.aspx.vb" %>
<%@ MasterType VirtualPath="~/main.master" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
search.aspx.vb 源代码片段
Imports System
Imports System.Net
Imports System.IO
Imports GlobalFunctions
Imports System.Xml
Imports System.Collections.Generic
Imports System.Collections
Imports System.Linq
Imports System.Resources
Imports generalMethods
Imports System.Globalization
Partial Class search
Inherits System.Web.UI.Page
但是当我尝试请求页面时:www.test.com/search.aspx 我收到此错误:说明:在解析服务此请求所需的资源期间发生错误。请查看以下特定的解析错误详细信息并适当地修改您的源文件。
解析器错误消息:无法加载类型“搜索”。
源错误:
Line 1: <%@ Page EnableViewState="true" EnableEventValidation="false" MetaDescription="<%$Resources:metadescription%>" Title="<%$Resources:pagetitle %>" Language="VB" MasterPageFile="~/main.master" AutoEventWireup="false" Inherits="search" Codebehind="search.aspx.vb" %>
Line 2:
Line 3: <%@ MasterType VirtualPath="~/main.master" %>
Source File: /search.aspx Line: 1
当我尝试构建项目时,我已经看到错误:无法加载类型“搜索”。
我不知道去哪里找这个了。