FindControl in MasterPage, first click generates empty string
<p>My web site uses a master page, where I've placed two controls, a TextBox and an ImageButton, they are intended to be viewed and accessible on all content sites. Here's the aspx code in <strong>Site.Master</strong>:</p>

<pre><code>&lt;asp:TextBox ID="TextBox1" runat="server"&gt;&lt;/asp:TextBox&gt;
&lt;asp:ImageButton ID="ImageBtn" runat="server" ImageUrl="~/Image.png"
  PostBackUrl="~/Result.aspx"&gt;&lt;/asp:ImageButton&gt;
</code></pre>

<p>Clicking the button should redirect the visitor to Result.aspx, which it does.</p>

<p><strong>Result.aspx.cs</strong> has the following in the Page_Load event:</p>

<pre><code>    protected void Page_Load(object sender, EventArgs e)
    {
        TextBox txbx = this.Master.FindControl("TextBox1") as TextBox;
        if (txbx != null)
        {
            Label1.Text = "Value: " + txbx.Text;
        }
        else
        {
            Label1.Text = "TextBox seems to be null";
        }
    }
</code></pre>

<p>The weird behavior appears when the image button is clicked the first time. The visitor gets this information from the page "Value: " (i.e an empty string ""), even though a value was entered in TextBox1. The subsequent clicks presents the value(s) correctly, e.g "Value: SomeText".</p>

<p>Why doesn't the value "come along" the first time?</p>

<p>Is there a better way to ensure that?</p>

<ul>
<li>The visitor is redirected to Result.aspx AND</li>
<li>that the value is "registered" and can be handled in Result.aspx.cs AND</li>
<li>that a user will be redirected, if Result.aspx is entered without the use of the image buttons PostBackURL </li>
</ul>

<p>I've tried IsPostBack but it seems to behave strangely when using a master page as previous page ...</p>

<p>Very thankful for an answer!</p>

<p>Sincerely,</p>

<p>Mr Kay</p>
