title: Pass value from grid view to new page ASP.NET C#?
body: <p>I have a grid view. 
  I want to take the selected row from the grid view and pass on a column value in that row to a new page while storing that value in the session. </p>
  
  <p>So far I know how to store it as a string from a tut, but don't know how to keep the value in int format not convert it to string.</p>
  
  <p>Here is what I have in my C# code...Like I said this does write out the row as a string type I want it to remain a int.</p>
  
  <pre><code>protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
      {
          if (e.CommandName == "Select")
          {
              Int16 num = Convert.ToInt16(e.CommandArgument);
              TextBox2.Text = GridView1.Rows[num].Cells[0].Text;
  
          }
      }
  </code></pre>
  
  <p>Putting it into session will be easy. I figured out it is:</p>
  
  <pre><code>Session["customerID"] =  GridView1.Rows[num].Cells[0].Text;
  </code></pre>
  
  <p>So now the true question is how to keep the value in a int format.</p>
  
  <p>Thanks!</p>