you might want to stay away from the dynamic ID's for the text boxes. If
you set the DataKeyField to, lets say a field called "ID" and the textbox is
named TextBox1...
then
dim i as int32 = 3 ' the item you are wanting
dim id as int32 = mylist.DataKeys(i) '' There's your ID
dim s as String =
ctype(mylist.items(i).FindControl("TextBox1"),Text Box).Text
make i a loop counter and you can interate through all of the items
"Jon" <Jo*@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
Hello All,
I have a datalist whose itemtemplate contains a label and a textbox. The
label text is set on itemdatabound with the text, which is a question,
from the database column. Each question has an associated textbox. I want the
user to put a response to each question in the textbox, and click save. How do
I get the values from the textboxes? Bearing in mind that they all have
dynamic ids.
Thanks all,
Jon