私の 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# Web サイトに放り込まれました。
前もって感謝します