i have a table with the name salary
EmpId Salary
----- ------
121 2000
122 2000
123 5000
124 4000
131 2000
132 6000
133 1000
134 1000
125 1000
126 20000
this is my table,
what i wanna do is calculate all the salary of the employe and display it in my text box as a total,how can i achieve it.
Calculate and display the value in a textbox
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sanjeeb LenkaRank #301 · 8.3K reputationPosted Oct 30, 2013, 8:39 PM EDT
try like this:
use sql query: Select Sum(Salary) from Tablesalary;
to retrive total salary from database then bind it to textbox
Stark38 reputationPosted Oct 30, 2013, 8:50 PM EDT