Cathi,
Would I then have to populate each textbox separately, like the checkboxlist, or can I have databinding do this as well?
TIA
Rex
>You can assign the id in the html view of your aspx page. Here is some sample code where the id is assigned:
>
>
><asp:repeater id="DataInputTableElements" datasource=< % ERROR: # items % >
>runat="server">
> <itemtemplate>
> <tr>
> <th>
> time< % ERROR: # Container.DataItem % >
> </th>
> <td>
> <asp:textbox id="TextBox1"
> cssclass="TextInput" runat="server" />
> </td>
> <th>
> time< % ERROR: # Container.DataItem % >
> </th>
> <td>
> <asp:textbox id="TextBox2"
> cssclass="TextInput" runat="server" />
> </td>
> </tr>
> </itemtemplate>
></asp:repeater>
>
>
>Then to iterate through the Textboxes inside the repeater you would use the foreach loop like below:
>
>
>foreach (RepeaterItem ri in myRepeater.Items)
> {
> // get the txtbox
> TextBox txt = ((TextBox)ri.FindControl("myTextbox"));
> }
>
>
>
>>All,
>>
>>I am creating Web textboxes via a repeater. I know the page creates a unique id for each textbox, but I want to be able to define the ids.
>>
>>I need to be able to pick the textboxes from the page so I can save the values back to the tables.
>>
>>How can I do this?
>>
>>TIA
>>
>>Rex