Good Day That was the code i used before to show the result in a label
what if i want the same result to be displayed in a grid view...
can any one help ...
SQL
Normal
0falsefalsefalse
EN-US
X-NONE
AR-SA
Protected Sub calculatememButton_Click(ByVal
sender As Object,
ByVal e As
System.EventArgs) Handles
calculatememButton.Click
Dim
E_member AsDouble
Dim
W_member AsDouble
Dim
E_result As String
Dim
w_result As String
Dim
e_factor AsDouble
Dim
w_factor AsDouble
E_member = electricitytxtmem.Text
W_member = watertxtmem.Text
E_result = E_result_mem_lbl.Text
w_result = W_result_mem_lbl.Text
e_factor = e_mem_f_DropDownList.Text
w_factor = W_mem_f_DropDownList.Text
E_result = E_member * e_factor
w_result = W_member * w_factor
If
IsDBNull(objReader("E_result")) =FalseThen
E_result_mem_lbl.Text = " * The value you've entered is: ( "
& E_member & " ) and this value
represents your Electrecity consumption rate for building 1.
* Your Electricity carbon footprint is: (" &
E_result & ") Metric Tons."
ElseIf
IsDBNull(objReader("E_result")) =TrueThen
W_result_mem_lbl.Text = "* The value you've entered is: ( "
& W_member & " ) and this value
represents your Water consumption rate for building 1.
* Your water carbon footprint is: ("
& w_result & ") Metric tons."
Else
Response.Write.("")
End If
End Sub
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
CrishRank #1,487 · 1.1K reputationPosted May 11, 2010, 3:27 AM EDT
DRISHTY134 reputationPosted May 11, 2010, 5:17 AM EDT