公平警告:我不理解我所知道的一半,我也不知道那么多,所以请原谅任何术语滥用或解释不明确的时候,我正在学习。
我正在开发一个电子商务商店应用程序。它有一个带有我的主题的App_Themes,下面是Scriptlets页眉、页脚、内容、侧边栏等等。
其中一个是带有商店徽标等的标题,另一个是内容(在本例中是接收页面的内容)。
当在收据页面上单击一个按钮时,我希望将头脚本设置为“走开”。我在想一个CSS显示:没有,但不知道如何在另一个脚本中处理这个部分。我也没有接受这个想法。
显然,我不能在一个单独的脚本中直接处理控件。
一些代码化的例子。
头:
!-- Store Banner-->
<div id="PageBanner">
<div id="PageBannerLogo">
[[ConLib:Custom/StoreLogo]]
</div>
</div>
[[ConLib:Custom/SwitchMobile]]内容:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ReceiptPageInvoice.ascx.cs" Inherits="ConLib_Custom_ReceiptPage" %>
<%--
<conlib>
<summary>Display page to show details of an order like order items, shipping address, billing address etc.</summary>
<param name="AllowAddNote" default="true">If true, the customer can add notes to the order. If false, the customer can only see notes added by the merchant.</param>
<param name="HandleFailedPayments" default="false">If true, the customer is redirected to an order payment page if the payment fails at checkout.</param>
</conlib>
--%>
<script src="js/showHide.js"></script>
<%--Scrolls address bar out of the way on iphones.
<script type="application/x-javascript">
addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);
function hideURLbar(){
window.scrollTo(0,1);
}
</script>--%>
<%@ Register Src="~/ConLib/OrderTotalSummary.ascx" TagName="OrderTotalSummary" TagPrefix="uc" %>
<%@ Register Src="~/ConLib/BreadCrumbs.ascx" TagName="BreadCrumbs" TagPrefix="uc" %>
<%@ Register Src="~/ConLib/Custom/OrderItemDetail.ascx" TagName="OrderItemDetail"
TagPrefix="uc" %>
<%@ Register Src="~/ConLib/Utility/PayPalPayNowButton.ascx" TagName="PayPalPayNowButton"
TagPrefix="uc" %>
<%-- this file is identical to ~/ConLib/MyOrderPage.ascx, with the addition of the affiliate tracker tag --%>
<%@ Register Src="~/Checkout/AffiliateTracker.ascx" TagName="AffiliateTracker" TagPrefix="uc" %>
<asp:PlaceHolder runat="server" ID="ReceiptPagePh" Visible="True">
<asp:Panel runat="server" ID="InvoicePageTopPnl">
<asp:PlaceHolder ID="BalanceDuePanel" runat="server" Visible="false" EnableViewState="false">
<br/>
<asp:Label ID="BalanceDueMessage" runat="server" Text="** Your order has a balance of {0:lc} due.  <a href='{1}'><u>Pay Now</u></a>"
SkinID="ErrorCondition"></asp:Label>
<br/>
<br/>
</asp:PlaceHolder> 更多的节目..。
我想隐藏标题的按钮:
<asp:Button runat="server" ID="ShowTicketButton" OnClick="ShowTicketButton_Click" Text="Show Ticket" />从一个剧本跳到另一个剧本对我来说是新的。在单个conlib中没有问题,但是在一个变化的外观中使用一个按钮是不一样的。这是我还没有达到的水平。
任何帮助都是非常感谢的。吉姆
发布于 2015-07-21 13:21:26
哇,从没见过这么多人被咬过。可能是因为我想得太少了。我的解决方案是简单地创建一个没有页眉/页脚的新布局脚本,并从内容脚本中删除面包屑conlib。现在,如果我们需要一个标题,我可以直接将它加载到页面中,然后随意显示和隐藏。感谢所有看过这个的人..。我知道这很奇怪。
https://stackoverflow.com/questions/31522991
复制相似问题