獨立於我做我的web應用程序的頁面始終是母版頁面。我有一個大多數頁面都繼承的主頁面,但我也有一個「Entrada.aspx」作爲登錄頁面,它不會繼承主頁面。我希望「Entrada.aspx」是默認頁面,但我無法將其設置爲任何方式。ASP.NET開始頁面總是加載主頁面
這是標題:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Entrada.aspx.cs" Inherits="webapp.Entrada" %>
我已經設置Entrada.aspx作爲Web應用程序的Visual Web屬性起始頁 - >開始行動
Specific Page: Entrada.aspx
我還要把它設置在web.config中:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<defaultDocument enabled="true">
<files>
<clear/>
<add value="Entrada.aspx"/>
</files>
</defaultDocument>
而且也不起作用。
我已經將它設置在Visual Web上下文菜單「設置爲起始頁」,它也不起作用。
它不會在調試模式或發佈之後進入Entrada.aspx? – nima
這看起來很平常,但是您是否嘗試將您的' '語句修改爲在右括號之前包含空格,例如: ' '。 –
temarsden
@nima如果我運行調試,它將轉到http:// localhost:59852/Entrada.aspx,但是如果我從瀏覽器直接訪問http:// localhost:59852 /它首先加載MasterPage –