Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. text box in loop (urgent)

text box in loop (urgent)

Scheduled Pinned Locked Moved ASP.NET
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kirthikirthi
    wrote on last edited by
    #1

    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

    V 1 Reply Last reply
    0
    • K kirthikirthi

      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

      V Offline
      V Offline
      Vimal Raj
      wrote on last edited by
      #2

      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

      K 1 Reply Last reply
      0
      • V Vimal Raj

        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

        K Offline
        K Offline
        kirthikirthi
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups