title: Null Value in Label object
body: <p>I have created on GridView with Label. I have written store procedure to get StatusCode</p>
  
  <pre><code>SELECT StatusCode
  From TableName
  </code></pre>
  
  <p>This line in GridView</p>
  
  <p>&lt; asp:Label ID="lblStatusCode" runat="server" Visible="false" </p>
  
  <p>Text='&lt;%#DataBinder.Eval(Container.DataItem, "StatusCode")%>' /></p>
  
  <p>These lines in .cs file</p>
  
  <pre><code>Label lblStatusCode = (Label)row.FindControl("lblStatusCode");
  objJV.Status = Convert.ToInt32(lblStatusCode.Text);
  </code></pre>
  
  <p>but in <code>lblStatusCode.Text</code> it is showing <em>NULL</em> even though there is value in Table.</p>
  
  <p>When I execute stored procedure independently it is giving values. </p>
  
  <p>// bind function</p>
  
  <p>protected void Page_Load(object sender, EventArgs e)
          {</p>
  
  <pre><code>        if (!IsPostBack)
          {
              BindJVJobValidationDetails();
  
          }
  
  
      }
  </code></pre>
  
  <p>protected void BindJVJobValidationDetails()
          {</p>
  
  <pre><code>        JVSummary objJV = new JVSummary();
  
          DataSet dataJobValidation = new DataSet();
  
          if (SessionVariables.PERID != null)
          {
  
              dataJobValidation = objJV.GetjvTransaction(SessionVariables.PERID);
  
              gvEmployee.DataSource = dataJobValidation;
              gvEmployee.DataBind();
  
          }
  
      }
  </code></pre>
  
  <p>What might be the problem...?</p>