Dynamic Textbox Value Retrieval

Discussion in '.NET' started by tmpm7, Feb 18, 2008.

  1. tmpm7

    tmpm7

    Joined:
    Feb 18, 2008
    Messages:
    1
    Hello,

    Currently I have a page that dynamically creates a number of textboxes based on an xml document. Essentially I am trying to have the user change the values in the textboxes and be able to update that xml, then update a SQL table with the updated xml. Right now, however, I cannot seem to get the text_changed event to work with any of my text boxes. Here is my code that is generating the textboxes:

    For i = 0 To nodeList.Count - 1
    currNode = nodeList.Item(i)

    txtNameValue = New TextBox
    lblNameValue = New Label

    lblNameValue.ID = "lblNameValue" & i
    txtNameValue.ID = "txtNameValue" & i
    lblNameValue.Text = currNode.Attributes("Id").Value
    txtNameValue.Text = currNode.InnerText
    txtRecordId.Text = objCallRecord.CallRecordId
    PlaceHolder2.Controls.Add(GetLiteral("<hr>"))
    PlaceHolder2.Controls.Add(lblNameValue)

    PlaceHolder2.Controls.Add(GetLiteral("<br>"))
    PlaceHolder2.Controls.Add(txtNameValue)
    Next

    PlaceHolder2.Controls.Add(GetLiteral("<hr>"))
    pnlSingle.Visible = True
    pnlSingle.Style.Item("Position") = "Absolute"
    pnlSingle.Style.Item("Left") = "200px"
    pnlSingle.Style.Item("Top") = "110px"


    I have a placeholder inside of a panel. I can access the values in the textboxes by their ID (which is txtNameValue + i, where i is the index at which they are created). I have a save button in place, however it does not update the textboxes. Any and all help is appreciated.

    Thanks!
     
    tmpm7, Feb 18, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rick Spiewak

    Re: HTML Form value retrieval

    Rick Spiewak, May 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    472
    =?Utf-8?B?TWF0dA==?=
    May 7, 2004
  2. Sparky Arbuckle

    Access Database Value Retrieval

    Sparky Arbuckle, Jun 3, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    377
    =?Utf-8?B?QmhhdmVzaCBQYXRlbA==?=
    Jun 3, 2005
  3. AGSHAR
    Replies:
    1
    Views:
    611
    AGSHAR
    May 31, 2008
  4. ArtySin

    textbox retrieval from sql server database

    ArtySin, Dec 2, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    702
    ArtySin
    Dec 2, 2006
  5. ErwinP
    Replies:
    1
    Views:
    821
    ErwinP
    Aug 19, 2005
Loading...

Share This Page