我的ascx頁面不可用:ASP:面板RUNAT = 「服務器」,在C#的.cs代碼頁
<%@ Control Language="c#" Inherits="FSB.Layouts.Short_Home_Loan_Application" CodeBehind="Short Home Loan Application.ascx.cs" %>
<div class="form">
<form action="" method="post" rel="shortForm">
<div class="section">
<asp:panel id="shortForm_wrapper" runat="server">
this is the first panel
</asp:panel>
<asp:Panel runat="server" ID="thankYouWrapper" >this is the second panel</asp:Panel>
</div>
</form>
</div>
<sc:sublayout runat="server" path="~/layouts/FSB/Document Checklist Lightbox.ascx" id="checklist" />
我的CS頁:
using System;
using Sitecore.Data.Items;
using Sitecore.Links;
using Sitecore.Data.Fields;
using Sitecore.Web.UI.WebControls;
using System.Net;
using FSB.Helpers;
using System.Configuration;
using System.Text;
using System.Web;
using System.Web.SessionState;
namespace FSB.Layouts {
public partial class Short_Home_Loan_Application : System.Web.UI.UserControl {
protected void Page_Load(object sender, EventArgs e) {
thankYouWrapper // not accessible here
}
}
}
注:這是一個CMS項目並使用Sitecore。我實際上並不知道這會有什麼幫助。我對C#完全陌生,並被拋入C#網站。
預先感謝
CodeBehind =「Short Home Loan Application.ascx.cs」頁面名稱後面的代碼實際上是否有空格?你可以刪除它們嗎? –
還是可以使用其他控件是後面的代碼? –
@benni_mac_b實際上頁面名稱包含空格 – Champ