text box in loop (urgent)
-
Dim i As Integer For i = 0 To 9 Dim str, str1 As String str = TextBox(i).Text.Substring(0, 3) str1 = textbox(i).Text.Substring(3, 7) Next i Can any one tell me right code of this it giving wrong i want add i value to the text box to repeant 10 times (10 textbox's) asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
-
Dim i As Integer For i = 0 To 9 Dim str, str1 As String str = TextBox(i).Text.Substring(0, 3) str1 = textbox(i).Text.Substring(3, 7) Next i Can any one tell me right code of this it giving wrong i want add i value to the text box to repeant 10 times (10 textbox's) asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
your post is a bit obscure. Try this . may be its of any use to you.
Dim ctl as Control For Each ctl In Me.Controls If ctl.GetType.Name = "TextBox" Then Dim str, str1 As String str = ctl.Text.Substring(0, 3) str1 = ctl.Text.Substring(3, 7) End If Next
If this is not what you need, then do make your post more clear. Happy Programming, Vimal -
your post is a bit obscure. Try this . may be its of any use to you.
Dim ctl as Control For Each ctl In Me.Controls If ctl.GetType.Name = "TextBox" Then Dim str, str1 As String str = ctl.Text.Substring(0, 3) str1 = ctl.Text.Substring(3, 7) End If Next
If this is not what you need, then do make your post more clear. Happy Programming, VimalDim ctl as Control For Each ctl In Me.Controls If ctl.GetType.Name = "TextBox" Then Dim str, str1 As String str = ctl.Text.Substring(0, 3) str1 = ctl.Text.Substring(3, 7) End If Next Hi the syntax is right but it is not working in ASP.NET it is giving this error Exception Details: System.InvalidCastException: Specified cast is not valid. Specified cast is not valid. EXPLAIN OF CODE : I have 10 text boxs and i am checking 10 ph.numbers are present in the database or not with 1 query Plese tell me code for this asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf -- modified at 5:21 Friday 3rd February, 2006