PrintNowPrintNowDocs
Themes

Server Controls

Reference for the ASP.NET server controls available in Print Store theme master pages.

Print Store themes use ASP.NET server controls to render dynamic storefront elements like search, shopping cart, login/logout, breadcrumbs, and the pricing calculator. These controls are placed in your master pages and automatically connect to the PrintNow backend.

Required Controls

Every PrintnowDisplay.master must include these infrastructure controls inside the <form> tag. They are invisible and do not render visible output, but are required for the storefront to function.

ControlPurpose
<telerik:radskinmanager id="RadSkinman" runat="server" skin="Default" />Manages Telerik control skins. Invisible — renders no visible output.
<asp:ScriptManager ID="ScriptManager1" runat="server" />Required ASP.NET AJAX script manager. Invisible — must appear once per page.
<printnow:warnBeforeLogout runat="server" />Displays a session timeout warning before automatic logout. Typically hidden with CSS/jQuery until triggered.

Content Placeholders

Content placeholders define injection points where child pages and the PrintNow engine insert content.

<%-- Must be the last tag in <head> --%>
<asp:ContentPlaceHolder ID="cpHead" runat="server"></asp:ContentPlaceHolder>

<%-- Main body content area --%>
<asp:ContentPlaceHolder ID="cpMainBody" runat="server" />

<%-- Page title bar (rarely used directly) --%>
<asp:ContentPlaceHolder ID="cpTitleBar" runat="server" />

See Master Pages for the full list of content placeholders by master page.

The search control consists of a text input and button that work together to provide storefront product search.

<asp:TextBox ID="search" runat="server" CssClass="form-control search"></asp:TextBox>
<pn:ButtonEx ID="searchButton" runat="server"
    Text="<i class='icon icon-search'></i>"
    CssClass="btn btn-default"
    CausesValidation="false" />
ControlDescription
<asp:TextBox ID="search">Search input field. Add CSS classes to style it. The CssClass="search" class is used by PrintNow's JavaScript to identify the search field.
<pn:ButtonEx ID="searchButton">Search submit button. The Text property supports HTML (e.g., icon markup). Set CausesValidation="false" to prevent form validation on search.

User & Authentication

ControlMarkupDescription
Welcome Message<pn:WelcomeUser runat="server" MessageFormat="Welcome, {name}" />Displays a personalized greeting for logged-in users. The MessageFormat property supports the {name} placeholder which is replaced with the customer's first name. Hidden when no user is logged in.
Account Header<printnow:AccountHeaderPane runat="server" />Renders login/logout links and account navigation. Automatically switches between a "Login" link for guests and "My Account" / "Logout" links for authenticated users.

Shopping Cart

<pn:CartCount runat="server" EmptyWhenZero="True" />

Displays the number of items in the customer's shopping cart. When EmptyWhenZero="True", the control renders nothing when the cart is empty, allowing you to conditionally show/hide cart UI with CSS.

Typical usage with a cart icon:

<a href="/viewcart.aspx">
    <i class="icon icon-shopping-cart"></i>
    <pn:CartCount runat="server" EmptyWhenZero="True" />
</a>
<pn:Breadcrumb ID="breadcrumb1" runat="server" />

Renders an automatic breadcrumb trail based on the current page's position in the site hierarchy. The breadcrumb updates dynamically as users navigate through categories, sub-categories, and product pages.

Calculator

<pn:Calculator runat="server" />

Renders the pricing calculator for the current product or category. The calculator's HTML template is loaded from the theme's calculator/ folder based on the CalculatorTemplate attribute set on the master page directive.

The calculator supports size selection, color options, quantity, turnaround time, and displays pricing totals. See Calculator for template customization.

Typical usage in a ProductDetails or SubCategoryOverview master page:

<div class="calc-container">
    <div class="card-body">
        <pn:Calculator runat="server" />
    </div>
</div>

Conditional Logic

Master pages support VB.NET inline expressions for conditional rendering:

Page Type Detection

<% If IsHomePage Then %>
    <!-- Content shown only on the home page -->
    <div class="hero-banner">...</div>
<% Else %>
    <!-- Content shown on all other pages -->
<% End If %>

Authentication State

<% If IsLoggedIn Then %>
    <div>Welcome back, <%= CustomerFirstName %></div>
<% Else %>
    <div><a href="/login.aspx">Sign In</a></div>
<% End If %>

See Data Properties for all available properties and functions.

Pricing Table Templates

On ProductDetails pages, you can display a pricing table using inline script templates that the calculator populates:

<script id="qp_table_head" type="text/template">
    <th class="text-center">{quantity}</th>
</script>
<script id="qp_table_cell" type="text/template">
    <td class="text-center">{total_price}</td>
</script>
<script id="qp_table_cell2" type="text/template">
    <td class="text-center">{unit_price}</td>
</script>

<div class="table-responsive">
    <table class="table table-sm table-striped">
        <tr data-pricing-table-template="#qp_table_head"></tr>
        <tr data-pricing-table-template="#qp_table_cell"></tr>
        <tr data-pricing-table-template="#qp_table_cell2"></tr>
    </table>
</div>

The data-pricing-table-template attribute links each table row to a script template. PrintNow's JavaScript populates the table with pricing data for all available quantities.

  • Master Pages — Layout files where these server controls are placed
  • Data Properties — Inline expressions used alongside server controls for conditional logic
  • Calculator — Customize the HTML template rendered by pn:Calculator
  • Skeleton Reference — See all required controls in context within a minimal master page

On this page