title: How Run A Stored Procedure (with Parameters - Has A return Value) From Code Behind?
body: <p>How can I use a stored procedure (with parameters - has a return value of type <code>int</code>) from code behind?</p>
  
  <p>My stored procedure looks like this :</p>
  
  <pre><code>ALTER Procedure [dbo].[sp_Noskheh_SumOfTotalPay]
      @Co_ID int
  AS
  -----------------
  Declare @Sum bigint
  -----------------
  BEGIN
      SELECT
         @Sum = SUM(TotalPay)
      FROM Noskheh
      WHERE
         (Co_ID = @Co_ID)
  
      RETURN @Sum
  END
  </code></pre>
  
  <p>I want to use <code>@Sum</code> in code behind ...</p>
  
  <p>Would you please show me a way for doing that ?</p>
  
  <p>Thanks in advance </p>
  
  <p>best regards</p>