title: how to post values from content page in asp.net
body: <p>in my web application I have master page and it has too many content pages and in my content pages I want to post form to other URL. but its not posting the values to other page in this way. </p>
  
  <p>But When I do the same code in simple aspx page without masterpage it works well.</p>
  
  <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&gt;
  
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"&gt;
  &lt;/asp:Content&gt;
  &lt;asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"&gt;
  &lt;form id="frmPay"&gt;
      &lt;div&gt;
  
      &lt;!-- Receiver Details --&gt;
      &lt;input type="hidden" name="merchant_id" id="merchant_id" value="xxgxg" &gt;
      &lt;input type="hidden" name="merchant_key" id="merchant_key" value="gxgagag" runat="server"&gt;
      &lt;input type="hidden" name="return_url" id="return_url" value="http://www.widget.co.za/payment_finished" runat="server"&gt;
      &lt;input type="hidden" name="cancel_url" id="cancel_url" value="http://www.widget.co.za/payment_cancelled" runat="server"&gt;
      &lt;input type="hidden" name="notify_url" id="notify_url" value="http://www.widget.co.za/payment_notify" runat="server"&gt;
  
      &lt;!-- Payer Details --&gt;
      &lt;input type="hidden" name="name_first" id="name_first"  value="Bob" runat="server"&gt;
      &lt;input type="hidden" name="name_last" id="name_last" value="Smith" runat="server"&gt;
      &lt;input type="hidden" name="email_address" id="email_address" value="bob.smith@example.com" runat="server"&gt;
  
      &lt;!-- Transaction Details --&gt;
      &lt;input type="hidden" name="m_payment_id" id="m_payment_id" value="TRN123456789" runat="server"&gt;
      &lt;input type="hidden" name="amount" id="amount" value="200.00" runat="server"&gt;
      &lt;input type="hidden" name="item_name" id="item_name" value="Widget Model 123" runat="server"&gt;
      &lt;input type="hidden" name="item_description" id="item_description" value="Widget Model 123" runat="server"&gt;
  
      &lt;!-- Transaction Options --&gt;
      &lt;input type="hidden" name="email_confirmation" id="email_confirmation" value="" runat="server"&gt;
  
      &lt;!-- Security --&gt;
      &lt;input type="hidden" name="signature" id="signature" value="" runat="server"&gt;
          &lt;asp:Button ID="Button1" runat="server" PostBackUrl="https://www.payfast.co.za/eng/process" Text="Button" /&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/asp:Content&gt;
  </code></pre>