Hi,
I am a novoice user in javascript and looking for javascript code equivalent for the below
vb.net code written by me. Can anybody show some light on converting this code to Jquery please?
Code:
Sub GetHSum(startControl As Integer, endControl As Integer)
Dim xsum As Integer, i As Integer
xsum = 0
i = 0
For i = startControl To endControl Step 5
T = TryCast(FindControl("ctl00$MainContent$TextBox" & i), TextBox)
If String.IsNullOrEmpty(T.Text) Then
xsum = xsum + 0
Else
If xsum = 0 Then
xsum += Convert.ToInt32(T.Text)
Else
xsum += Convert.ToInt32(T.Text)
End If
End If
Next
'Because the loop advances i by 5 before it quits the loop
'Eg: if range is given as 1,56 then i value will be 61 by the time it quits the loop
T = TryCast(FindControl("ctl00$MainContent$TextBox" & i), TextBox)
T.Text = xsum
i = 0
End Sub