Dynamic Textbox Value Retrieval

Joined
Feb 18, 2008
Messages
1
Reaction score
0
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!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top