<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/FiniqAppMasterPage.Master" CodeBehind="STPShowMessage.aspx.vb"
    Inherits="FinIQWebApp.STPShowMessage" ValidateRequest="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="ContentLayout" ContentPlaceHolderID="MainContent" runat="server">

    <link href="../App_Themes/Style1.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .Initial {
            display: block;
            padding: 4px 18px 4px 18px;
            float: left;
            /*background: url("../Images/InitialImage.png") no-repeat right top;*/
            color: Black;
            font-weight: bold;
        }

            .Initial:hover {
                color: White;
                /*background: url("../Images/SelectedButton.png") no-repeat right top;*/
            }

        .Clicked {
            float: left;
            display: block;
            /*background: url("../Images/SelectedButton.png") no-repeat right top;*/
            padding: 4px 18px 4px 18px;
            color: Black;
            font-weight: bold;
            color: White;
        }

        .tbl {
            width: 100%;
        }

        .auto-style1 {
            height: 18px;
        }

        .txtprops {
            font-size: 14px !important;
            font-family: Verdana !important;
        }

        .gridprops {
            font-size: 16px !important;
            font-family: Verdana !important;
        }

        .btnPDF {
            width: 50px;
            background-image: url("../App_Resources/pdf.png");
            margin-left: 5px;
            padding: 5px;
        }

        .lblExport {
            width: 100px;
            padding: 5px;
        }

        .ddlExport {
            padding: 5px;
        }

        .lnkExport {
            padding: 5px;
        }
    </style>


    <%-- <iframe id="Iframe1" src="../InterfaceTemplateMapping/TemplateMaster.aspx" onload=" setSize()" runat="server" ></iframe>--%>

    <div>

        <asp:ScriptManagerProxy ID="ScriptMaanagerProxy1" runat="server"></asp:ScriptManagerProxy>

        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanelSM" DisplayAfter="0">
            <ProgressTemplate>
                <%-- <div class="divLoading">
                    <img alt="Loading" src="../App_Resources/loading.gif" style="width: 40px" />
                    <span class="lbl">Loading...</span>
                </div>--%>
            </ProgressTemplate>
        </asp:UpdateProgress>

        <asp:UpdatePanel ID="UpdatePanelSM" runat="server">
            <ContentTemplate>

                <table class="tbl">
                    <tr>
                        <td>
                            <asp:Label ID="lblError" runat="server" CssClass="lblerror"></asp:Label>
                            <asp:Label ID="lblInfo" runat="server" CssClass="lblInfo" ForeColor="Red" display="Dynamic"></asp:Label>
                            <asp:Label ID="lblWarning" runat="server" CssClass="lblWarning" ForeColor="Red" display="Dynamic"></asp:Label>
                            <asp:Label ID="lblExport" Text="Export To" CssClass="lbl lblExport" runat="server" />
                            <asp:DropDownList ID="ddlExport" CssClass="ddl ddlExport" runat="server" Width="50px" AutoPostBack="True">
                                <asp:ListItem Text="PDF" Value="PDF"></asp:ListItem>
                                <asp:ListItem Text="XML" Value="XML"></asp:ListItem>
                            </asp:DropDownList>
                            <asp:LinkButton ID="lnkExport" Text="Download" CssClass="lnkExport" runat="server" ToolTip="Download" />

                        </td>
                    </tr>
                </table>
                <br />
                <cc1:TabContainer ID="tabContainer1" runat="server" ActiveTabIndex="0" AutoPostBack="true" CssClass="ajax_tab_xp">
                    <cc1:TabPanel ID="tabPanel1" runat="server" HeaderText="Raw" TabIndex="0" CssClass="tabsize">
                        <ContentTemplate>
                            
                            <asp:TextBox ID="txtXML" runat="server" CssClass="txt txtprops" ReadOnly="True" Width="100%" Height="600px" Font-Size="Large" TextMode="MultiLine"></asp:TextBox>
                        </ContentTemplate>
                    </cc1:TabPanel>
                    <cc1:TabPanel ID="tabPanel2" runat="server" HeaderText="Data" TabIndex="1" CssClass="tabsize">
                        <ContentTemplate>
                            <%--<asp:UpdatePanel ID="UpdatePanel2" runat="server">
                        <ContentTemplate>--%>
                            <div style="vertical-align: top; height: 600px; overflow: auto; width: 100%;">
                                <asp:DataGrid ID="gvXML" runat="server" CssClass="Grid gridprops"
                                    AutoGenerateColumns="True" AllowColumnResizing="True" Width="100%"
                                    CellPadding="3" ShowHeaderWhenEmpty="true" AllowSorting="True"
                                    EmptyDataText="No data available." PageSize="15">
                                    <ItemStyle CssClass="gridprops" />
                                    <HeaderStyle CssClass="GridHeader"></HeaderStyle>
                                    <FooterStyle CssClass="GridFooter"></FooterStyle>
                                    <PagerStyle CssClass="GridPager" />
                                    <Columns>
                                    </Columns>
                                </asp:DataGrid>
                            </div>
                            <%--</ContentTemplate>
                    </asp:UpdatePanel>--%>
                        </ContentTemplate>
                    </cc1:TabPanel>
                </cc1:TabContainer>

            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="lnkExport" />
               
            </Triggers>
        </asp:UpdatePanel>
    </div>

    <script type="text/javascript">

        function ExportClick() {
            
            document.getElementById('<%= lnkExport.ClientID%>').click();

        }
    </script>

    <script type="text/javascript">
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        function EndRequestHandler(sender, args) {
            
            if (args.get_error() != undefined) {
                args.set_errorHandled(true);
            }
        }
    </script>
</asp:Content>
