Posted on: 2/7/2014 2:20:46 AM | Views : 584

Hi, 
I want to get the value of my textbox that I created dynamically when I click a button
I need to do this cause the value of my textbox is used for retrieve data from database
how could I achieved this thing??
here is my code to make the textbox
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load For i As Integer = 0 To 4 textbox = New TextBox With {.ID = "TextBox" & i} plchld.Controls.Add(textbox) Next End Sub I have tried something like this but the code didn't work
Protected Sub OkButton_Click(sender As Object, e As EventArgs) Handles OkButton.Click Dim a(5) As String For i As Integer = 0 To 4 a(i) = CType(plchld.FindControl("Textbox" & i), TextBox).Text Next End Sub thanks in advance for any help

Go to the complete details ...