|In the code block below I am wishing to use a variable in a xxxx.Rows.Count line. Specifically, I'm wanting to take the "R1200s" portion and increment it to R1201s, R1202s, R1203s and so on as the For-Next loop executes.
I, of course, already have the DataTable()'s portion defined... no problem there. The code works fine if I write out every single instance but I'd like to shorten it up into a simpler block of code. I've been able to use "i" in every other control with success but getting hung up on only this portion.
I've tried something like ("R120" & i & "s"), along with many variations of this but, can find no solution that works with the limited experience I have with VbScript. Any help, a code example or a point in the right direction, is greatly appreciated.
For i = 1 To 8
Dim Ai As Label = DirectCast(Page.FindControl("A" & i.ToString()), Label)
Dim Si As Hyperlink = DirectCast(Page.FindControl("S" & i.ToString()), Hyperlink)
If R1200s.Rows.Count < Slots.Rows(0)(Ri).ToString() +1 Then
Si.ImageUrl = "images/" & i & ".png"
Si.NavigateUrl = "step3.aspx?Time=" & i & "&Date=" & Request.QueryString("Date") & "&Day=" & Request.QueryString("Day") & "&Entry=" & Request.QueryString("Entry")
modified 24-May-17 2:20am.