2
Answers

Calculate and display the value in a textbox

Stark

Stark

11y
1.5k
1

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.

 


 

Answers (2)
0
Sanjeeb Lenka

Sanjeeb Lenka

NA 22.1k 1.3m 11y
hi,

try like this:

use sql query: Select Sum(Salary) from Tablesalary;

to retrive total salary from database then bind it to textbox
Accepted
0
Stark

Stark

NA 40 21.4k 11y
Thanks alot.