Welcome !
         

 Access dynamically created textboxes

Author Message
Big Dave

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 11/25/2009
  • Status: offline
Access dynamically created textboxes Wednesday, November 25, 2009 12:27 AM (permalink)
0
I am in the process of creating a website, but have run into some difficulties regarding dynamically created textboxes.

I have used a for loop to create text boxes, but now cannot work out how to access any text entered in them! Any help would be greatly appreciated. Here is the code so far-



 For i As Integer = 1 To List1.SelectedValue
            Dim txtComment, txtMark As New TextBox
            txtComment.
            txtComment.ID = "Comment" & i
            lblNumber.Text = i
            txtComment = New TextBox
            txtComment.Width = 500
            txtMark.Width = 50
            lblDescription.Text = i
            txtComment.MaxLength = 200
            txtMark.MaxLength = 2


            View1.Controls.Add(New LiteralControl("<tr><td>"))
            View1.Controls.Add(lblNumber)
            View1.Controls.Add(New LiteralControl("</td>"))

            View1.Controls.Add(New LiteralControl("<td>"))
            View1.Controls.Add(txtComment)
            View1.Controls.Add(New LiteralControl("</td>"))

            View1.Controls.Add(New LiteralControl("<td><center>"))
            View1.Controls.Add(txtMark)
            View1.Controls.Add(New LiteralControl("</td></tr>"))
            ID += 1
   
            txtComment.Text = "Comment" & i

        Next
 
#1
    grace01

    • Total Posts : 2
    • Scores: 0
    • Reward points : 0
    • Joined: 8/10/2010
    • Status: offline
    Re:Access dynamically created textboxes Tuesday, August 10, 2010 4:48 PM (permalink)
    0
    Hello Friends

    i am not able to create dynamically textboxes
    also how to create it and fetch the data  into it
     if anyone know please send me the reply to me

    Have Nice Day

    ++++++++++++++++++++++++++++++++++++++++++++++++++++

    "Want to get-on Google's first page and loads of traffic to your website?

    Hire a SEO Specialist from Ocean Groups SEO SPECIALIST "

     
    #2
      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2017 ASPPlayground.NET Forum Version 3.9