<%@ Page Title="" Language="C#" MasterPageFile="~/Samples.Master" %>
<script runat="server">
    public static string GetPostData()
    {
        StringBuilder output = new StringBuilder();
        output.Append("<br/>Request method: " + HttpContext.Current.Request.HttpMethod + "<br/>");
        
        // Load POST form fields collection into NameValueCollection object.
        NameValueCollection form = HttpContext.Current.Request.Form;
            
        // Put the names of all keys into a string array.
        String[] keys = form.AllKeys;
        for (int i = 0; i < keys.Length; i++)
        {
            output.Append("Name: " + keys[i] + "<br/>");
            
            // Get all values under this key.
            String[] values = form.GetValues(keys[i]);
            for (int j = 0; j < values.Length; j++)
            {
                output.Append("Value: " + values[j] + "<br/>");
            }
            output.Append("<br/>");
        }

        return output.ToString();
    }

</script>    

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>SelectPdf for .NET - Helper Page - View HTTP Posted Parameters - C# / ASP.NET</title>
    <meta name="description" content="SelectPdf Helper Page - View HTTP POST data. C#/ASP.NET Sample. Pdf Library for .NET with full sample code in C# and VB.NET." itemprop="description">
</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 - Helper Page - View HTTP POST parameters - C# / ASP.NET Sample</h1>
            </header>
            <!-- .entry-header -->

            <div class="entry-content">
                <p>
                    This page shows the HTTP POST variables sent to it.
                    <br />
                    <%=GetPostData()%>
                </p>
            </div>
            <!-- .entry-content -->
        </article>
        <!-- #post -->
</asp:Content>
