title: how to return int value from select query in function?
body: <p>I need to retrieve Ticket_Id from tbl_Ticket to pass into body section of sending email function..
  Is the below code correct?
  every times i get Ticket_Id 1..</p>
  
  <pre><code>public int select_TicketId(){
      string strConn = System.Configuration.ConfigurationManager.ConnectionStrings["conString"].ConnectionString.ToString();
      SqlConnection sqlCon = new SqlConnection(strConn);
      string getId = ("select Ticket_Id from tbl_Ticket where Client_EmailAdd='" + objNewTic_BAL.email + "' ");
      sqlCon.Open();
      SqlCommand cmd1 = new SqlCommand(getId, sqlCon);
      int i=cmd1.ExecuteNonQuery();
      return i;
  }
  </code></pre>