title: Query string value is lost after page postback
body: <p>This shows the patient details page when <code>&lt;a href="" /&gt;</code> is clicked (anchor tag is inside repeater):</p>
  
  <pre class="lang-js prettyprint-override"><code>function showPatient(Pid) {                          
      RedirectToPage("Patient_Registration.aspx","pid="+Pid);
      return false;
  }
  </code></pre>
  
  <pre class="lang-asp prettyprint-override"><code>&lt;asp:Repeater ID="repeaterPatientList" runat="server" OnItemDataBound="repeaterPatientList_ItemDataBound" &gt;
      &lt;ItemTemplate&gt;
          &lt;a href="#" onclick="return showPatient('&lt;%#Eval("PID") %&gt;')"&gt;&lt;%#Eval("Patient_Name")%&gt;&lt;/a&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>I am getting <code>pID</code> as query string on patient details page. After getting <code>pID</code> on first page load the patient information is filled into the respective text fields. But when I click the save button <code>pID</code> is lost - getting 0 as value so that the insert query always fires.</p>
  
  <pre class="lang-c# prettyprint-override"><code>int pID;
  protected void Page_Load(object sender, EventArgs e)
  {
      pID = Convert.ToInt32(Request["pid"]);
  
      if (pID != 0)
      {
          if (IsPostBack == false)
          {
              FillPatientInfo(pID);
          }
      } 
  }
  protected void btnSave_Click(object sender, EventArgs e)
  {
      if(pID ==0)
      {
          //insert query code
      }
      else
      {
          //update query code
      }
  }
  </code></pre>