title: Javascript loads linkbutton.text on another page but blanks out another linkbutton.text value
body: <p>I have 2 pages.  Page1 has two imagebuttons.  We can call them ibtn1 and ibtn2 that when clicked creates a popup window (Page2), where the user can select the correct gvrow he wants placed into a linkbutton.text and hiddenfield.value on Page1.  I can click ibtn1 and select the option in the popup and it populates back to Page1 correctly.  I then click ibtn2 and it populates back to page1 correctly BUT the values that were populated on page1 from clicking ibtn1 get blanked out.</p>
  
  <p>All of the other textbox values, dropdownlists, and checkboxes on page1 stay the same.  What am i missing here?  Thanks for your help ahead of time.  I have messed with the viewstate settings to no avail. but maybe I am doing something wrong.</p>
  
  <p>Code for popup ibtn1 onclick c#/js;</p>
  
  <pre><code>    protected void iblookupvendor_Click(object sender, ImageClickEventArgs e)
      {
          string vendor = "vw_LookupVendor";
          string redirect = string.Format("&lt;script&gt;window.open('/Lookup.aspx?id={0}','_blank','directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=1000,height=350');&lt;/script&gt;", vendor);
          Response.Write(redirect);
      }
  </code></pre>
  
  <p>Ibtn1:</p>
  
  <pre><code>            &lt;asp:ImageButton ID="iblookupvendor" runat="server" ImageUrl="\images\btn_off_lookup.gif"
                  OnClick="iblookupvendor_Click" ToolTip="Change Vendor" /&gt;
  </code></pre>
  
  <p>Code for Ibtn2:</p>
  
  <pre><code>    protected void iblookupcustomer_Click(object sender, ImageClickEventArgs e)
      {
          string customer = "vw_LookupCustomer";
          string redirect = string.Format("&lt;script&gt;window.open('/Lookup.aspx?id={0}','_blank','directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=1000,height=600');&lt;/script&gt;", customer);
          Response.Write(redirect);
      }
  </code></pre>
  
  <p>Ibtn2:</p>
  
  <pre><code>            &lt;asp:ImageButton ID="iblookupcustomer" runat="server" ImageUrl="\images\btn_off_lookup.gif"
                  OnClick="iblookupcustomer_Click" ToolTip="Change Customer" /&gt;
  </code></pre>
  
  <p>Click event from page2 to pass back to page1 c#,js:</p>
  
  <pre><code>    protected void gvlookup_SelectedIndexChanged(object sender, EventArgs e)
      {
          acctid = gvlookup.SelectedRow.Cells[0].Text;
          acctname = gvlookup.SelectedRow.Cells[1].Text;
          if (view == "vw_LookupVendor")
          {
              string redirect = string.Format("&lt;script&gt;window.opener.document.getElementById('lbvendor').text = '{0}';window.opener.document.getElementById('txtfromchildvendorid').value = '{1}';&lt;/script&gt;", acctname, acctid);
              Response.Write(redirect);
              this.ClientScript.RegisterClientScriptBlock(this.GetType(), "Close", "window.close()", true);
          }
          else 
          {
              string redirect = string.Format("&lt;script&gt;window.opener.document.getElementById('lbcustomer').text = '{0}';window.opener.document.getElementById('txtfromchildcustomerid').value = '{1}';&lt;/script&gt;", acctname, acctid);
              Response.Write(redirect);
              this.ClientScript.RegisterClientScriptBlock(this.GetType(), "Close", "window.close()", true);
          }
  
      }
  </code></pre>
  
  <p>Linkbuttons being updated:</p>
  
  <pre><code>            &lt;asp:LinkButton ID="lbvendor" runat="server" OnClick="lbvendor_Click" 
                  ViewStateMode="Enabled"&gt;Vendor&lt;/asp:LinkButton&gt;
  
              &lt;asp:LinkButton ID="lbcustomer" runat="server" OnClick="lbcustomer_Click" 
                  ViewStateMode="Enabled"&gt;Customer&lt;/asp:LinkButton&gt;
  </code></pre>