Ayesha balooshi

Ayesha balooshi

  • NA
  • 18
  • 28.2k

grid view based on users entry .. "Halp"

May 11 2010 5:09 AM
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 ...


 

Protected Sub calculatememButton_Click(ByVal
sender As Object,
ByVal e As
System.EventArgs) Handles
calculatememButton.Click



 



        Dim
E_member As Double



        Dim
W_member As Double



        Dim
E_result As String



        Dim
w_result As String



        Dim
e_factor As Double



        Dim
w_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



 



 



        If
IsDBNull(objReader("E_result")) = False Then



            E_result_mem_lbl.Text = " * The value you've entered is: ( "
& E_member & " ) and this value
represents your Electrecity consumption rate for building 1. <br>
<br> * Your Electricity carbon footprint is: ("
&
E_result & ") Metric Tons."



        ElseIf



            IsDBNull(objReader("E_result")) = True
Then



            W_result_mem_lbl.Text = "* The value you've entered is: ( "
& W_member & " ) and this value
represents 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



Answers (2)