0

我有一个 49 页的网站 (asp.net 4)。该网站位于vb中。

但是我添加了一个论坛(并将其称为“knowledgbase”),所以它就像... company.com/knowledgebase/ ...我将论坛配置为 IIS7 中的一个单独的应用程序,它是用c#编写的。

是否可以在 c# 论坛中使用我的 vb 母版页之一?还是我必须创建一个完全独立的 c# 母版页?

编辑:

基本上,在知识库/default.aspx 文件中,有这样的:

<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false"   
Inherits="YAF.ForumPageBase" culture="auto" uiculture="auto"  %>
<%@ Register TagPrefix="YAF" Assembly="YAF" Namespace="YAF" %>
<script runat="server">

我试过这样做:

<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" 
Inherits="YAF.ForumPageBase" culture="auto" uiculture="auto" 
MasterPageFile="~/homepage.Master"  %>
<%@ Register TagPrefix="YAF" Assembly="YAF" Namespace="YAF" %>
<script runat="server">

但是当然……页面语言是“c#”,母版页是用 vb 编写的。所以结果是这样的(如预期的那样):

Server Error in '/knowledgebase' 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: The 'masterpagefile' attribute is not supported by the 
'register' directive.
4

0 回答 0