I have dynamically created n number of text boxes in a form like txtQL(1),
txtQL(2) , ...txtQL(n)
How can I retrieve the values in a loop? I'm confused as to how to approach
this! Please help.
I get the error "Referenced object has a value of 'Nothing'". as indicated in
the code below:
For Each c In Controls
If i < maxRow Then[color=blue]
>Error txtQLLink(i) = c.FindControl(" txtQLLink(" + i & ")")[/color]
txtQLUrl(i) = c.FindControl(" txtQlUrl(" + i & ")")
If txtQLLink(i).Te xt <> "" Then
textQLHtml = textQLHtml & txtQLUrl(i).Tex t & txtQLLink(i).Te xt
strQL = strQL & txtQLLink(i).Te xt & "," & txtQLUrl(i).Tex t
i += 1
End If
End If
Next
Thanks for your time.
txtQL(2) , ...txtQL(n)
How can I retrieve the values in a loop? I'm confused as to how to approach
this! Please help.
I get the error "Referenced object has a value of 'Nothing'". as indicated in
the code below:
For Each c In Controls
If i < maxRow Then[color=blue]
>Error txtQLLink(i) = c.FindControl(" txtQLLink(" + i & ")")[/color]
txtQLUrl(i) = c.FindControl(" txtQlUrl(" + i & ")")
If txtQLLink(i).Te xt <> "" Then
textQLHtml = textQLHtml & txtQLUrl(i).Tex t & txtQLLink(i).Te xt
strQL = strQL & txtQLLink(i).Te xt & "," & txtQLUrl(i).Tex t
i += 1
End If
End If
Next
Thanks for your time.
Comment