<%@ Page Title="" Language="C#" MasterPageFile="~/Samples.Master" AutoEventWireup="true" CodeBehind="exclude-from-conversion.aspx.cs" Inherits="SelectPdf.Samples.exclude_from_conversion" ValidateRequest="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>SelectPdf for .NET - Exclude Elements from Conversion with Html to Pdf Converter - C# / ASP.NET</title>
    <meta name="description" content="SelectPdf Getting Exclude Elements from Conversion with Html to Pdf Converter Sample for C# ASPNET. Pdf Library for .NET with full sample code in C# and VB.NET." itemprop="description">
    <meta name="keywords" content="exclude element, hide element, pdf library, sample code, html to pdf, pdf converter" itemprop="keywords">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" runat="server">
        <article class="post type-post status-publish format-standard hentry">
            <header class="entry-header">
                <h1 class="entry-title">SelectPdf for .NET - Exclude Elements from Conversion with Html to Pdf Converter - C# / ASP.NET Sample</h1>
            </header>
            <!-- .entry-header -->

            <div class="entry-content">
                <p>
                    This sample shows how the html to pdf converter can be used to convert a web page excluding certain elements from the conversion using SelectPdf Pdf Library for .NET.
                    <br />
                    <br />
                    The elements from the page that will be excluded from the converted pdf document are defined using CSS selectors.
                    For example, the selector for all the H1 elements is "H1", the selector for all the elements with the CSS class name 'myclass' is "*.myclass" and 
                    the selector for the elements with the id 'myid' is "*#myid". Read more about CSS selectors <a href="http://www.w3schools.com/cssref/css_selectors.asp" target="_blank">here</a>.
                </p>
                <p>
                    Url:<br />
                    <asp:TextBox ID="TxtUrl" runat="server" Width="90%" Text="http://selectpdf.com"></asp:TextBox>
                    <br />
                    <br />
                    Exclude the following elements:<br />
                    <asp:TextBox ID="TxtElements" runat="server" Width="90%" Text="*#site-navigation, *#colophon"></asp:TextBox>
                    <br />
                    <br />
                    <asp:Button ID="BtnCreatePdf" runat="server" Text="Create PDF" OnClick="BtnCreatePdf_Click" CssClass="mybutton" />
                </p>
            </div>
            <!-- .entry-content -->
        </article>
        <!-- #post -->
</asp:Content>

