我有一个带有这样的 div 的用户控件:
<div runat="server" id="pnlShippingMethods" class="checkoutstep">
<div class="steptitle">
<%=GetLocaleResourceString("CheckoutOnePage.ShippingMethods.Title")%>
<div style="float: right;">
</div>
Date from checkout page one for ship method update panel is <%= DateTime.Now.ToString() %>
</div>
<asp:Panel runat="server" ID="pnlShippingMethodsContent" class="stepcontent">
<nopCommerce:CheckoutShippingMethod ID="ctrlCheckoutShippingMethod" runat="server"
OnePageCheckout="true" />
</asp:Panel>
</div>
我在放置此控件的页面加载时设置为可见 = false。然后从同一页面上的另一个控件,我试图让它像这样可见:
HtmlGenericControl pnlShippingMethods = this.Parent.Parent.Parent.Parent.Parent.FindControl("pnlShippingMethods") as HtmlGenericControl;
pnlShippingMethods.Visible = true;
我能够从其他用户控件而不是 div 使可见/不可见用户控件 CheckoutShippingMethod 。请建议如何使其可见