ASP.NET Dynamic Textbox ChangeText Help

Discussion in 'Software' 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. smi59550
    Replies:
    0
    Views:
    1,606
    smi59550
    Jan 18, 2008
  2. smi59550
    Replies:
    0
    Views:
    6,197
    smi59550
    Jan 18, 2008
  3. gautam2u@gmail.com
    Replies:
    2
    Views:
    1,682
    ProgTalk
    Feb 7, 2008
  4. arecev
    Replies:
    0
    Views:
    1,544
    arecev
    Apr 5, 2009
  5. kasbekar.ajay

    Asp.Net Bind javascript to textbox

    kasbekar.ajay, Apr 22, 2010, in forum: Software
    Replies:
    0
    Views:
    3,130
    kasbekar.ajay
    Apr 22, 2010
Loading...

Share This Page