我的 ascx 页面:
<%@ 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# 网站。
提前致谢