Protected Sub calculatememButton_Click(ByValsender As Object,ByVal e AsSystem.EventArgs) HandlescalculatememButton.Click DimE_member As Double DimW_member As Double DimE_result As String Dimw_result As String Dime_factor As Double Dimw_factor As Double 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 IfIsDBNull(objReader("E_result")) = False Then E_result_mem_lbl.Text = " * The value you've entered is: ( "& E_member & " ) and this valuerepresents your Electrecity consumption rate for building 1. <br><br> * 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 valuerepresents your Water consumption rate for building 1. <br> <br> * Your water carbon footprint is: ("& w_result & ") Metric tons." Else Response.Write.("") End If End Sub
Protected Sub calculatememButton_Click(ByValsender As Object,ByVal e AsSystem.EventArgs) HandlescalculatememButton.Click
DimE_member As Double
DimW_member As Double
DimE_result As String
Dimw_result As String
Dime_factor As Double
Dimw_factor As Double
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
IfIsDBNull(objReader("E_result")) = False Then
E_result_mem_lbl.Text = " * The value you've entered is: ( "& E_member & " ) and this valuerepresents your Electrecity consumption rate for building 1. <br><br> * 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 valuerepresents your Water consumption rate for building 1. <br> <br> * Your water carbon footprint is: ("& w_result & ") Metric tons."
Else
Response.Write.("")
End If
End Sub