Get text from dynamically created textbox in asp.net

后端 未结 3 1468
无人及你
无人及你 2020-12-20 22:07

I\'ve been banging my head against this all morning, so hopefully I can get some help. Essentially I\'m having issues getting values from some textbox controls I\'m creating

3条回答
  •  没有蜡笔的小新
    2020-12-20 22:16

    You add TextBox controls to templateFormPlaceholder.Controls but use form1.FindControl to find them. FindControl method will find a control only if the control is directly contained by the specified container - from http://msdn.microsoft.com/en-us/library/486wc64h.aspx. Try calling templateFormPlaceholder.FindControl instead.

提交回复
热议问题