0

Markup:

<asp:Label ID="LabelProfit" runat="server"></asp:Label><p>
<asp:Label ID="LabelCost" runat="server"></asp:Label><p>
<asp:Label ID="LabelFinalBalance" runat="server" Text="Label"></asp:Label> 

I have 3 label LabelProfit and LabelCost get their values from code behind with this method:

Serverside:

 public void getProfitSum()
 {
     string connectionString = cs.getConnection();
     using (SqlConnection myConnection = new SqlConnection(connectionString))
     {
           myConnection.Open();
           SqlCommand command = new SqlCommand("spSumProfit", myConnection);
           command.CommandType = System.Data.CommandType.StoredProcedure;
           command.Parameters.AddWithValue("@userId", cui.getCurrentId());
           LabelProfit.Text = command.ExecuteScalar().ToString();
       }
  }

I want with Jquery to do labelFinalBalance = LabelProfit-LabelCost Could do that with Jquery?

4

1 に答える 1