Export Wizard Control Value to PDF using iTextSharp in ASP.Net

Last Reply 15 days ago By pandeyism

Posted 15 days ago

hey,

i am using wizard control in my project which consist 6 steps.starting 5 steps accepting values inserted by the users and in the 6th step i am calculating and showing the values as a table form like invoice.i want to generate pdf of that 6th step by clicking on download button. i have no idea how to do it.so please help me.

step1

<asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">
<div class="content">
    <div class="signup-form">
        <div class="form-group">
            <div class="input-group">
                <asp:TextBox ID="txt_fname" CssClass="form-control" runat="server" placeholder="Farmer Name"
                    required="required"></asp:TextBox>
            </div>
        </div>
        <div class="form-group">
            <div class="input-group">
                <asp:DropDownList ID="ddl_state" AutoPostBack="True" required="required" placeholder="Select State"
                    CssClass="form-control" runat="server" DataSourceID="SqlDataSource1" DataTextField="sname"
                    DataValueField="sid">
                </asp:DropDownList>
                <asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString='<%$ ConnectionStrings:Mycon %>'
                    SelectCommand="SELECT * FROM [states]"></asp:SqlDataSource>
            </div>
        </div>
        <div class="form-group">
            <div class="input-group">
                <asp:DropDownList ID="ddl_dist" AutoPostBack="True" required="required" placeholder="Select State"
                    CssClass="form-control" runat="server" DataSourceID="SqlDataSource2" DataTextField="dname"
                    DataValueField="did">
                </asp:DropDownList>
                <asp:SqlDataSource runat="server" ID="SqlDataSource2" ConnectionString='<%$ ConnectionStrings:Mycon %>'
                    SelectCommand="SELECT * FROM [states_district] WHERE ([sid] = @sid)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="ddl_state" PropertyName="SelectedValue" Name="sid"
                            Type="Int32"></asp:ControlParameter>
                    </SelectParameters>
                </asp:SqlDataSource>
            </div>
        </div>
        <div class="form-group">
            <div class="input-group">
                <asp:TextBox ID="txt_addr" CssClass="form-control" runat="server" placeholder="Address/Village"
                    required="required" TextMode="MultiLine"></asp:TextBox>
            </div>
        </div>
        <div class="form-group">
            <div class="input-group">
                <asp:TextBox ID="txt_email" CssClass="form-control" runat="server" placeholder="Email"
                    required="required"></asp:TextBox>
            </div>
        </div>
        <div class="form-group">
            <div class="input-group">
                <asp:TextBox ID="txt_cno" CssClass="form-control" runat="server" placeholder="Contac Number"
                    required="required"></asp:TextBox>
            </div>
        </div>
    </div>
    <hr />
</div>
</asp:WizardStep>
step2
<asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2">
<div class="content signup-form">
    <table>
        <tr>
            <td>
                <div class="form-group">
                    <div class="input-group">
                        <asp:TextBox ID="txt_length" CssClass="form-control" runat="server" placeholder="Field Length(m)"
                            required="required"></asp:TextBox>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                    <div class="input-group">
                        <asp:TextBox ID="txt_width" CssClass="form-control" runat="server" placeholder="Field Width(m)"
                            required="required"></asp:TextBox>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                    <div class="input-group">
                        <asp:DropDownList ID="ddl_soil" AutoPostBack="True" required="required" placeholder="Select State"
                            CssClass="form-control" runat="server">
                            <asp:ListItem>--Select Soil Type</asp:ListItem>
                            <asp:ListItem>Clay</asp:ListItem>
                            <asp:ListItem>Sandy Clay</asp:ListItem>
                            <asp:ListItem>Silty Clay</asp:ListItem>
                            <asp:ListItem>Sandy Clay Loam</asp:ListItem>
                            <asp:ListItem>Clay Loam</asp:ListItem>
                            <asp:ListItem>Silty Clay Loam</asp:ListItem>
                            <asp:ListItem>Sandy Loam</asp:ListItem>
                            <asp:ListItem>Loam</asp:ListItem>
                            <asp:ListItem>Silt Loam</asp:ListItem>
                            <asp:ListItem>Gamy sand</asp:ListItem>
                            <asp:ListItem>Silt Loam</asp:ListItem>
                            <asp:ListItem>Silt</asp:ListItem>
                            <asp:ListItem>Gamy Sand</asp:ListItem>
                            <asp:ListItem>Sand</asp:ListItem>
                        </asp:DropDownList>
                    </div>
                </div>
            </td>
        </tr>
    </table>
</div>
<br>
</asp:WizardStep>
step3
<asp:WizardStep ID="WizardStep3" runat="server" Title="Step 3">
<div class="content signup-form">
    <div class="form-group">
        <div class="input-group">
            <asp:TextBox ID="txt_crop" CssClass="form-control" runat="server" placeholder="Crop to be grown"
                required="required"></asp:TextBox>
        </div>
    </div>
</div>
</asp:WizardStep>
step4
<asp:WizardStep ID="WizardStep4" runat="server" Title="Step 4">
<div class="content signup-form">
    <table>
        <tr>
            <td>
                <div class="form-group">
                    <div class="input-group">
                        <asp:DropDownList ID="ddl_source" AutoPostBack="True" required="required" placeholder="Select State"
                            CssClass="form-control" runat="server">
                            <asp:ListItem>--Select Water Source</asp:ListItem>
                            <asp:ListItem>Tubewell</asp:ListItem>
                            <asp:ListItem>Canal / Pond</asp:ListItem>
                        </asp:DropDownList>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                    <div class="input-group">
                        <asp:RadioButtonList ID="rbtn" runat="server">
                            <asp:ListItem Value="Center Of Field">Center Of Field</asp:ListItem>
                            <asp:ListItem Value="Middle Of Width">Middle Of Width</asp:ListItem>
                            <asp:ListItem Value="Corner Of Field">Corner Of Field</asp:ListItem>
                            <asp:ListItem Value="Middle Of Width">Middle Of Width</asp:ListItem>
                        </asp:RadioButtonList>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                    <div class="input-group">
                        <asp:TextBox ID="txt_grwatr" CssClass="form-control" runat="server" placeholder="Depth Of Ground Water"
                            required="required"></asp:TextBox>
                    </div>
                </div>
            </td>
        </tr>
    </table>
</div>
</asp:WizardStep>
step5
<asp:WizardStep ID="WizardStep5" runat="server" Title="Step 5">
<div class="content">
    <div class="container">
        <ul class="responsive-table">
            <li class="table-row">
                <div class="col col-1">
                </div>
                <div class="col col-2">
                    <asp:DropDownList CssClass="form-control dropdown" AutoPostBack="true" ID="ddl_comp"
                        runat="server" DataSourceID="SqlDataSource3" DataTextField="name" DataValueField="email">
                    </asp:DropDownList>
                    <asp:SqlDataSource runat="server" ID="SqlDataSource3" ConnectionString='<%$ ConnectionStrings:Mycon %>'
                        SelectCommand="select name,email from registration where type != 'admin' and status=1">
                    </asp:SqlDataSource>
                </div>
                <div class="col col-3">
                </div>
                <div class="col col-4">
                </div>
            </li>
        </ul>
        <!--Table-->
        <table id="tablePreview" class="table table-bordered table-striped table-hover">
            <!--Table head-->
            <thead>
                <tr>
                    <th>
                        #
                    </th>
                    <th>
                        Components
                    </th>
                    <th>
                        Specification
                    </th>
                    <th>
                        Price
                    </th>
                    <th>
                        Select Price
                    </th>
                </tr>
            </thead>
            <!--Table head-->
            <!--Table body-->
            <tbody>
                <tr>
                    <th scope="row">
                        1
                    </th>
                    <td>
                        Nozzle
                    </td>
                    <td>
                        <div class="card" style="height: auto; width: auto">
                            <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource10">
                                <ItemTemplate>
                                    <asp:Label Text='<%# Eval("nozzle_lph") %>' runat="server" ID="nozzle_lphLabel" />(lph)<br />
                                    <br />
                                </ItemTemplate>
                            </asp:DataList>
                            <asp:SqlDataSource runat="server" ID="SqlDataSource10" ConnectionString='<%$ ConnectionStrings:Mycon %>'
                                SelectCommand="SELECT [nozzle_lph] FROM [company_sprinkler_data] WHERE (([company_email] = @company_email) AND ([nozzle_lph] != @nozzle_lph))">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="ddl_comp" PropertyName="SelectedValue" Name="company_email"
                                        Type="String"></asp:ControlParameter>
                                    <asp:Parameter DefaultValue="0" Name="nozzle_lph" Type="Int32"></asp:Parameter>
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </div>
                    </td>
                    <td>
                        <div class="card" style="height: auto; width: auto">
                            <asp:DataList ID="DataList2" runat="server" DataSourceID="SqlDataSource11">
                                <ItemTemplate>
                                    &nbsp;<asp:Label ID="nozzle_priceLabel" runat="server" Text='<%# Eval("nozzle_price") %>' />
                                    (Rs)<br />
                                    <br />
                                </ItemTemplate>
                            </asp:DataList>
                            <asp:SqlDataSource ID="SqlDataSource11" runat="server" ConnectionString="<%$ ConnectionStrings:Mycon %>"
                                SelectCommand="SELECT [nozzle_price] FROM [company_sprinkler_data] WHERE (([company_email] = @company_email) AND ([nozzle_price] != @nozzle_price))">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="ddl_comp" Name="company_email" PropertyName="SelectedValue"
                                        Type="String" />
                                    <asp:Parameter DefaultValue="0" Name="nozzle_price" Type="Double" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </div>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddl_nprice" runat="server" AutoPostBack="true" DataSourceID="SqlDataSource4"
                            DataTextField="nozzle_price" DataValueField="nozzle_lph">
                        </asp:DropDownList>
                        <asp:SqlDataSource runat="server" ID="SqlDataSource4" ConnectionString='<%$ ConnectionStrings:Mycon %>'
                            SelectCommand="SELECT [company_email], [nozzle_lph], [nozzle_price] FROM [company_sprinkler_data] WHERE (([company_email] = @company_email) AND ([nozzle_lph] != @nozzle_lph) AND ([nozzle_price] != @nozzle_price))">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddl_comp" PropertyName="SelectedValue" Name="company_email"
                                    Type="String"></asp:ControlParameter>
                                <asp:Parameter DefaultValue="0" Name="nozzle_lph" Type="Int32"></asp:Parameter>
                                <asp:Parameter DefaultValue="0" Name="nozzle_price" Type="Double"></asp:Parameter>
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        2
                    </th>
                    <td>
                        Lateral
                    </td>
                    <td>
                        <div class="card" style="height: auto; width: auto">
                            <asp:DataList ID="DataList11" runat="server" DataSourceID="SqlDataSource12">
                                <ItemTemplate>
                                    <asp:Label ID="lateral_mmLabel" runat="server" Text='<%# Eval("lateral_mm") %>' />(mm)
                                    <br />
                                    <br />
                                </ItemTemplate>
                            </asp:DataList>
                            <asp:SqlDataSource ID="SqlDataSource12" runat="server" ConnectionString="<%$ ConnectionStrings:Mycon %>"
                                SelectCommand="SELECT [lateral_mm] FROM [company_sprinkler_data] WHERE (([lateral_mm] != @lateral_mm) AND ([company_email] = @company_email))">
                                <SelectParameters>
                                    <asp:Parameter DefaultValue="0" Name="lateral_mm" Type="Int32" />
                                    <asp:ControlParameter ControlID="ddl_comp" Name="company_email" PropertyName="SelectedValue"
                                        Type="String" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </div>
                    </td>
                    <td>
                        <div class="card" style="height: auto; width: auto">
                            <asp:DataList ID="DataList4" runat="server" DataSourceID="SqlDataSource13">
                                <ItemTemplate>
                                    <asp:Label ID="lateral_priceLabel" runat="server" Text='<%# Eval("lateral_price") %>' />(Rs)
                                    <br />
                                    <br />
                                </ItemTemplate>
                            </asp:DataList>
                            <asp:SqlDataSource ID="SqlDataSource13" runat="server" ConnectionString="<%$ ConnectionStrings:Mycon %>"
                                SelectCommand="SELECT [lateral_price] FROM [company_sprinkler_data] WHERE (([company_email] = @company_email) AND ([lateral_price] != @lateral_price))">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="ddl_comp" Name="company_email" PropertyName="SelectedValue"
                                        Type="String" />
                                    <asp:Parameter DefaultValue="0" Name="lateral_price" Type="Double" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </div>
                    </td>
                    <td>
                        <asp:DropDownList CssClass="form-control dropdown" ID="ddl_lprice" runat="server"
                            DataSourceID="SqlDataSource6" DataTextField="lateral_price" DataValueField="company_email">
                        </asp:DropDownList>
                        <asp:SqlDataSource runat="server" ID="SqlDataSource6" ConnectionString='<%$ ConnectionStrings:Mycon %>'
                            SelectCommand="SELECT [company_email], [lateral_mm], [lateral_price] FROM [company_sprinkler_data] WHERE (([company_email] = @company_email) AND ([lateral_mm] != @lateral_mm) AND ([lateral_price] != @lateral_price))">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddl_comp" PropertyName="SelectedValue" Name="company_email"
                                    Type="String"></asp:ControlParameter>
                                <asp:Parameter DefaultValue="0" Name="lateral_mm" Type="Int32"></asp:Parameter>
                                <asp:Parameter DefaultValue="0" Name="lateral_price" Type="Double"></asp:Parameter>
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        3
                    </th>
                    <td>
                        Submain Pipe
                    </td>
                    <td>
                        <div class="card" style="height: auto; width: auto">
                            <asp:DataList ID="DataList5" runat="server" DataSourceID="SqlDataSource14">
                                <ItemTemplate>
                                    <asp:Label ID="submain_mmLabel" runat="server" Text='<%# Eval("submain_mm") %>' />(mm)
                                    <br />
                                    <br />
                                </ItemTemplate>
                            </asp:DataList>
                            <asp:SqlDataSource ID="SqlDataSource14" runat="server" ConnectionString="<%$ ConnectionStrings:Mycon %>"
                                SelectCommand="SELECT [submain_mm] FROM [company_sprinkler_data] WHERE (([company_email] = @company_email) AND ([submain_mm] != @submain_mm))">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="ddl_comp" Name="company_email" PropertyName="SelectedValue"
                                        Type="String" />
                                    <asp:Parameter DefaultValue="0" Name="submain_mm" Type="Int32" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </div>
                    </td>
                    <td>
                        <div class="card" style="height: auto; width: auto">
                            <asp:DataList ID="DataList6" runat="server" DataSourceID="SqlDataSource15">
                                <ItemTemplate>
                                    <asp:Label ID="submain_priceLabel" runat="server" Text='<%# Eval("submain_price") %>' />(Rs)
                                    <br />
                                    <br />
                                </ItemTemplate>
                            </asp:DataList>
                            <asp:SqlDataSource ID="SqlDataSource15" runat="server" ConnectionString="<%$ ConnectionStrings:Mycon %>"
                                SelectCommand="SELECT [submain_price] FROM [company_sprinkler_data] WHERE (([company_email] = @company_email) AND ([submain_price] != @submain_price))">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="ddl_comp" Name="company_email" PropertyName="SelectedValue"
                                        Type="String" />
                                    <asp:Parameter DefaultValue="0" Name="submain_price" Type="Double" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </div>
                    </td>
                    <td>
                        <asp:DropDownList CssClass="form-control dropdown" ID="ddl_sprice" runat="server"
                            DataSourceID="SqlDataSource5" DataTextField="submain_price" DataValueField="company_email">
                        </asp:DropDownList>
                        <asp:SqlDataSource runat="server" ID="SqlDataSource5" ConnectionString='<%$ ConnectionStrings:Mycon %>'
                            SelectCommand="SELECT [company_email], [submain_mm], [submain_price] FROM [company_sprinkler_data] WHERE (([company_email] = @company_email) AND ([submain_mm] != @submain_mm) AND ([submain_price] != @submain_price))">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddl_comp" PropertyName="SelectedValue" Name="company_email"
                                    Type="String"></asp:ControlParameter>
                                <asp:Parameter DefaultValue="0" Name="submain_mm" Type="Int32"></asp:Parameter>
                                <asp:Parameter DefaultValue="0" Name="submain_price" Type="Double"></asp:Parameter>
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        4
                    </th>
                    <td>
                        Main Pipe
                    </td>
                    <td>
                        <div class="card" style="height: auto; width: auto">
                            <asp:DataList ID="DataList7" runat="server" DataSourceID="SqlDataSource16">
                                <ItemTemplate>
                                    <asp:Label ID="main_mmLabel" runat="server" Text='<%# Eval("main_mm") %>' />(mm)
                                    <br />
                                    <br />
                                </ItemTemplate>
                            </asp:DataList>
                            <asp:SqlDataSource ID="SqlDataSource16" runat="server" ConnectionString="<%$ ConnectionStrings:Mycon %>"
                                SelectCommand="SELECT [main_mm] FROM [company_sprinkler_data] WHERE (([company_email] = @company_email) AND ([main_price] != @main_price))">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="ddl_comp" Name="company_email" PropertyName="SelectedValue"
                                        Type="String" />
                                    <asp:Parameter DefaultValue="0" Name="main_price" Type="Double" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </div>
                    </td>
                    <td>
                        <div class="card" style="height: auto; width: auto">
                            <asp:DataList ID="DataList8" runat="server" DataSourceID="SqlDataSource17">
                                <ItemTemplate>
                                    <asp:Label ID="main_priceLabel" runat="server" Text='<%# Eval("main_price") %>' />(Rs)
                                    <br />
                                    <br />
                                </ItemTemplate>
                            </asp:DataList>
                            <asp:SqlDataSource ID="SqlDataSource17" runat="server" ConnectionString="<%$ ConnectionStrings:Mycon %>"
                                SelectCommand="SELECT [main_price] FROM [company_sprinkler_data] WHERE (([company_email] = @company_email) AND ([main_price] != @main_price))">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="ddl_comp" Name="company_email" PropertyName="SelectedValue"
                                        Type="String" />
                                    <asp:Parameter DefaultValue="0" Name="main_price" Type="Double" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </div>
                    </td>
                    <td>
                        <asp:DropDownList CssClass="form-control dropdown" ID="ddl_mprice" runat="server"
                            DataSourceID="SqlDataSource7" DataTextField="main_price" DataValueField="company_email">
                        </asp:DropDownList>
                        <asp:SqlDataSource runat="server" ID="SqlDataSource7" ConnectionString='<%$ ConnectionStrings:Mycon %>'
                            SelectCommand="SELECT [company_email], [main_mm], [main_price] FROM [company_sprinkler_data] WHERE (([company_email] = @company_email) AND ([main_mm] != @main_mm) AND ([main_price] != @main_price))">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddl_comp" PropertyName="SelectedValue" Name="company_email"
                                    Type="String"></asp:ControlParameter>
                                <asp:Parameter DefaultValue="0" Name="main_mm" Type="Int32"></asp:Parameter>
                                <asp:Parameter DefaultValue="0" Name="main_price" Type="Double"></asp:Parameter>
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </td>
                </tr>
                <tr>
                    <th scope="row">
                        5
                    </th>
                    <td>
                        Motor Pump
                    </td>
                    <td>
                        <div class="card" style="height: auto; width: auto">
                            <asp:DataList ID="DataList9" runat="server" DataSourceID="SqlDataSource18">
                                <ItemTemplate>
                                    <asp:Label ID="Sp_mpump_hpLabel" runat="server" Text='<%# Eval("Sp_mpump_hp") %>' />(hp)
                                    <br />
                                    <br />
                                </ItemTemplate>
                            </asp:DataList>
                            <asp:SqlDataSource ID="SqlDataSource18" runat="server" ConnectionString="<%$ ConnectionStrings:Mycon %>"
                                SelectCommand="SELECT [Sp_mpump_hp] FROM [company_sprinkler_data] WHERE (([company_email] = @company_email) AND ([submain_mm] != @submain_mm))">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="ddl_comp" Name="company_email" PropertyName="SelectedValue"
                                        Type="String" />
                                    <asp:Parameter DefaultValue="0" Name="submain_mm" Type="Int32" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </div>
                    </td>
                    <td>
                        <div class="card" style="height: auto; width: auto">
                            <asp:DataList ID="DataList10" runat="server" DataSourceID="SqlDataSource19">
                                <ItemTemplate>
                                    <asp:Label ID="Sp_mpump_priceLabel" runat="server" Text='<%# Eval("Sp_mpump_price") %>' />(Rs)
                                    <br />
                                    <br />
                                </ItemTemplate>
                            </asp:DataList>
                            <asp:SqlDataSource ID="SqlDataSource19" runat="server" ConnectionString="<%$ ConnectionStrings:Mycon %>"
                                SelectCommand="SELECT [Sp_mpump_price] FROM [company_sprinkler_data] WHERE (([company_email] = @company_email) AND ([submain_price] != @submain_price))">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="ddl_comp" Name="company_email" PropertyName="SelectedValue"
                                        Type="String" />
                                    <asp:Parameter DefaultValue="0" Name="submain_price" Type="Double" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </div>
                    </td>
                    <td>
                        <asp:DropDownList CssClass="form-control dropdown" ID="ddl_mtr_price" runat="server"
                            DataSourceID="SqlDataSource9" DataTextField="Sp_mpump_price" DataValueField="company_email">
                        </asp:DropDownList>
                        <asp:SqlDataSource runat="server" ID="SqlDataSource9" ConnectionString='<%$ ConnectionStrings:Mycon %>'
                            SelectCommand="SELECT [company_email], [Sp_mpump_hp], [Sp_mpump_price] FROM [company_sprinkler_data] WHERE (([company_email] = @company_email) AND ([Sp_mpump_hp] != @Sp_mpump_hp) AND ([Sp_mpump_price] != @Sp_mpump_price))">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddl_comp" PropertyName="SelectedValue" Name="company_email"
                                    Type="String"></asp:ControlParameter>
                                <asp:Parameter DefaultValue="0" Name="Sp_mpump_hp" Type="Int32"></asp:Parameter>
                                <asp:Parameter DefaultValue="0" Name="Sp_mpump_price" Type="Double"></asp:Parameter>
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </td>
                </tr>
            </tbody>
            <!--Table body-->
        </table>
        <!--Table-->
    </div>
</div>
step6
<asp:WizardStep ID="WizardStep6" runat="server" Title="Step 6">
    <div>
        <br />
        <b><i>Hi
            <asp:Label ID="lbl_name" runat="server" Text=""></asp:Label>,
            <br />
            <asp:Label ID="lbl_addr" runat="server" Text=""></asp:Label>,
            <br />
            <asp:Label ID="lbl_dist" runat="server" Text=""></asp:Label>,
            <asp:Label ID="lbl_state" runat="server" Text="Label"></asp:Label>
            <br />
            Phone:
            <asp:Label ID="lbl_phone" runat="server" Text=""></asp:Label>
            <br />
            Email:
            <asp:Label ID="lbl_email" runat="server" Text=""></asp:Label>
        </i></b>
        <hr />
        <p>
            Thank you for using the System - AgriIrriGreat to design the Sprinkler irrigation
            system for your field. The design of Sprinkler irrigation system is based on the
            data inputted by you. Besides a suitable layout plan and its design details, AgriIrriGreat
            also provides a cost estimate based on the indicative prices of different components
            of the Sprinkler irrigation system.
        </p>
        <hr />
        <h2>
            Data Provided By User:</h2>
        <table class="table table-bordered table-striped table-hover">
            <tr>
                <td>
                    <b>Lenght of Field (m):</b>
                    <asp:Label ID="lbl_length" runat="server" Text="Label"></asp:Label>, <b>Width of field
                        (m):</b>
                    <asp:Label ID="lbl_width" runat="server" Text="Label"></asp:Label>, <b>Crop to be grown:</b>
                    <asp:Label ID="lbl_crop" runat="server" Text="Label"></asp:Label>, <b>Source of water:</b>
                    <asp:Label ID="lbl_source" runat="server" Text="Label"></asp:Label>, <b>Location of
                        water source:</b>
                    <asp:Label ID="lbl_location" runat="server" Text="Label"></asp:Label>
                </td>
            </tr>
        </table>
        <hr />
    </div>
    <div>
        <!--Table-->
        <table id="tablePreview1" class="table table-striped table-hover table-bordered">
            <thead>
                <tr>
                    <th>
                        Type Of Pipe
                    </th>
                    <th>
                        Selected Size
                    </th>
                    <th>
                        Unit needed
                    </th>
                    <th>
                        Unit Price(Rs)
                    </th>
                    <th>
                        Cost Rs.
                    </th>
                </tr>
            </thead>
            <tr>
                <td>
                    Nozzle
                </td>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                </td>
                <td>
                    <asp:Label ID="lbl_nprice" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Lateral
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    <asp:Label ID="lbl_lprice" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Submain Pipe
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    <asp:Label ID="lbl_sprice" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Main Pipe
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    <asp:Label ID="lbl_mprice" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <b>Cost Of All Pipes</b>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Sand Filter
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    <asp:Label ID="Label5" runat="server" Text="-"></asp:Label>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Screen Filter
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    <asp:Label ID="Label6" runat="server" Text="-"></asp:Label>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Hydrocyclone Filter
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    <asp:Label ID="Label7" runat="server" Text="-"></asp:Label>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Disc Filter
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    <asp:Label ID="Label8" runat="server" Text="-"></asp:Label>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Venturi
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    <asp:Label ID="Label9" runat="server" Text="-"></asp:Label>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Fertilizer tank
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    <asp:Label ID="Label10" runat="server" Text="-"></asp:Label>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Fertigation pump
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    <asp:Label ID="Label11" runat="server" Text="-"></asp:Label>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <b>Micro Sprinkler System Cost (SC)</b>
                </td>
                <td colspan="2">
                    <b>Total of all items above</b>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <b>Accessories Cost (AC)</b>
                </td>
                <td colspan="2">
                    <b>10% of Total of system Cost</b>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    Motor Pump Cost(MC)
                </td>
                <td>
                </td>
                <td>
                </td>
                <td>
                    <asp:Label ID="lbl_mpump_price" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <b>Total Cost(SC+AC+MC) -Rs.</b>
                </td>
                <td>
                </td>
            </tr>
        </table>
    </div>
    <hr />
    <div>
        <asp:Button ID="btn_download" runat="server" Text="Download" OnClick="btn_download_Click" />
    </div>
</asp:WizardStep>

 

Posted 15 days ago Modified on 15 days ago

Hi nid@patel,

Take reference to below code make code for generating pdf.

You need to replace your control with database value. refer below for better understand.

How to generate and download PDF Report from database in ASP.Net using iTextSharp C# and VB.Net