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