Shakti Singh

Shakti Singh

  • NA
  • 1
  • 3.9k

Displaying Sum of two values in Gridview wiout saing in Data

Feb 5 2013 5:32 AM
Hey Friends...

i want a simple example to display a sum of two values in database.

in database i have
id, one and two as row

in default.aspx
I have 2 text box
and one submit button

on clicking to submit button.. values of both the two text box got saved in database
and i can display them on gridview.. by using databind.

now i want that there should be a 3rd column in Gridview which display the total of two numbers.. (1+1 = 3) i.e 3 should be displayed but it's values (3) should not be saved in database.
every time when i run... it display the total of all numbers which are saved in database

example.

one    two        sum
1         1            2

2         2            4

2         5            7

etc.

plz help me as i'm new in asp.

Answers (3)