title: Why doesn't output parameter work?
body: <p>I am returning an output parameter i.e FormNo from stored procedure in sql. It returns successfully, i checked procedure but in c# code it doesn't return anything.</p>
  
  <pre><code>public static Boolean InsertAppliedWorks(int NITNo, int WorkNo, out int FormNo, int ContractorID, decimal FinancialMoney, int OfficeID, int OrgID)
  {
      Boolean status = false;
  
      ClsDatabaseManager dbManager = ClsDatabaseManager.InitializeDbManager(Constants.Databases.TendersConnection);
      try
      {
          FormNo = 0;
  
          dbManager.Open();
          dbManager.CreateParameters(7);
          dbManager.AddParameters(0, "@NIT_No", NITNo);
          dbManager.AddParameters(1, "@Work_No", WorkNo);
          dbManager.AddParameters(2, "@FormNo", FormNo, ParameterDirection.Output);
          dbManager.AddParameters(3, "@Contractor_ID", ContractorID);
          dbManager.AddParameters(4, "@FinancialMoney", FinancialMoney);
          dbManager.AddParameters(5, "@Organization_ID", OrgID );
          dbManager.AddParameters(6, "@Office_ID", OfficeID);
  
          status = dbManager.ExecuteNonQuery("InsertAppliedWorks").ToBool();
      }
      catch (Exception ex)
      {
          throw ex;
      }
      finally
      {
          dbManager.Close();
          dbManager.Dispose();
  
      }
      return status;
  }
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>protected void btnSavePrint_Click(object sender, EventArgs e)
  {
      try
      {
          ClsTender.InsertAppliedWorks(NitNo, WorkNo, out formno, ContractorID, Cost.ToDecimal(), bp.LoginMainOfficeID, bp.LoginOrganizationID);
  
          int TestFormNo = formno;
          Response.Redirect("/forms/general/TenderPrint.aspx?"+"NitNo="+SharedUtility.EncryptURL(NitNo.ToString())+"&amp;WorkNo="+SharedUtility.EncryptURL(WorkNo.ToString()));
      }
  }
  </code></pre>
  
  <p>now it returns nothing in FormNo</p>
  
  <p>please help me on this. It has wasted a lot of time and still no signs,</p>