Object reference is not set into instance of an object
<p>I am retrieving data from database table.</p>

<p>By giving input as 1 in </p>

<pre><code>textbox1(voucherno)--&gt;damagedetail = 
                      web.getdamageddetail(Convert.ToInt32(voucherno.Text));
</code></pre>

<p>I want get <em>branchno</em> as output in textbox2(branchno) </p>

<pre><code>branchno.Text = damagedetail.branchno.ToString();
</code></pre>

<p>but am getting error </p>

<blockquote>
  <p>Object reference is not set into instance of an object.</p>
</blockquote>

<p>Check my second line.</p>

<p>Is second line coding correct?</p>
