2013-11-04 76 views
0

我有這樣一頁只能有一個服務器端Form標記問題

<%@ Master Language="C#" MasterPageFile="~/masterpages/XmasShop.master" AutoEventWireup="true" %> 
<asp:Content ContentPlaceHolderID="cphContents" runat="server"> 
    <asp:LoginView runat="server" ID="lview1"> 
     <LoggedInTemplate> 
      <div class="confirmation-cantainer"> 
       <div class="confirm-01"> 
        <form runat="server"> 
         <umbraco:Macro Alias="[Xmas]ShopConfirm" runat="server"></umbraco:Macro> 
        </form> 
       </div> 
      </div> 
     </LoggedInTemplate> 
    </asp:LoginView> 
</asp:Content> 

<asp:Content ContentPlaceHolderID="cphAuthenticationPane" runat="server"> 
    <asp:LoginView runat="server" ID="lview12"> 
     <LoggedInTemplate> 
      <form runat="server"> 
       <asp:LoginStatus ID="lslougout" runat="server" Style="float: right; color: #003263; text-decoration: none;" text="Logout"></asp:LoginStatus> 
      </form> 
     </LoggedInTemplate> 
    </asp:LoginView> 
</asp:Content> 

一個母版你可以看到我有兩個形式的標籤,但兩者是分開的不nested.Still我收到錯誤

A page can have only one server-side Form tag. 

任何一個可以建議我一個solution.When我試圖刪除它拋出一個錯誤元素必須是一個表單標籤內的一種形式,當我添加上述錯誤的形式。

回答

1

一種解決方案是將登錄信息放在單獨的頁面上。你也可以考慮使用iframe。

0

發生因使用此錯誤不止一個

<form runnat="server"> 

標籤。 刪除一個表單標籤。

This would be more clear by visiting this link

+0

它是關於嵌套的標籤,我在我的問題,我沒有使用嵌套形式,已經告訴一個頁面中的兩種形式是允許的,如果它不嵌套 – Athul

相關問題