B
BigJohn
I have successfully displayed text boxes in a repeater. The repeater is in a
User Control. The User Control is in a container which references a master
page.
I have another user control which contains text boxes. For this one, the
simple syntax of:
dim ctlWork as Textbox
ctlWork = ctype(Me.ctnInformation.FindControl("txtFName"), Textbox)
strWork = ctlWork.Text
In the case where I am having problems, the objects are laid out as follows:
Page Level:
<asp:Content ID="Main" ContentPlaceHolderID="ContentPlaceHolder1"
runat=server>
<table width="100%" border="1" bordercolor=black >
<tr>
<td width="100%">
<uc2:RegistrationE11 ID="RegistrationE11_1"
runat="server" />
</td>
</tr>
</table>
</asp:Content>
User Control:
<Table ID="tblE1Data" Border=0 Width="100%" runat=server >
<tr id="rowE1Update" runat=server>
<td>
<asp:TextBox ID="txtFName" runat=server MaxLength=100
Width=140px></asp:TextBox> (textbox is filled in codebehind)
<td>
<asp:Repeater ID="repUpdate" runat=server>
<HeaderTemplate >
<table width=100% border=0>
</HeaderTemplate>
<ItemTemplate >
<tr>
<td>
<asp:textbox ID="RegIDE1" runat=server
Text=<%# Databinder.Eval(container.dataitem, "RegID") %>></asp:TextBox>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</td>
</tr>
</Table>
The intention is to have the user udpate the text boxes (there is more to
this project than what is shown of course), click the Update button on the
page, and apply the changes.
I tried Me.RegistrationE11_1.FindControl("RegIDE1") but the resulting type
is Nothing.
What is the syntax to look at all the textbox "RegIDE1" values from the
repeater on the user control in the main page?
User Control. The User Control is in a container which references a master
page.
I have another user control which contains text boxes. For this one, the
simple syntax of:
dim ctlWork as Textbox
ctlWork = ctype(Me.ctnInformation.FindControl("txtFName"), Textbox)
strWork = ctlWork.Text
In the case where I am having problems, the objects are laid out as follows:
Page Level:
<asp:Content ID="Main" ContentPlaceHolderID="ContentPlaceHolder1"
runat=server>
<table width="100%" border="1" bordercolor=black >
<tr>
<td width="100%">
<uc2:RegistrationE11 ID="RegistrationE11_1"
runat="server" />
</td>
</tr>
</table>
</asp:Content>
User Control:
<Table ID="tblE1Data" Border=0 Width="100%" runat=server >
<tr id="rowE1Update" runat=server>
<td>
<asp:TextBox ID="txtFName" runat=server MaxLength=100
Width=140px></asp:TextBox> (textbox is filled in codebehind)
<td>
<asp:Repeater ID="repUpdate" runat=server>
<HeaderTemplate >
<table width=100% border=0>
</HeaderTemplate>
<ItemTemplate >
<tr>
<td>
<asp:textbox ID="RegIDE1" runat=server
Text=<%# Databinder.Eval(container.dataitem, "RegID") %>></asp:TextBox>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</td>
</tr>
</Table>
The intention is to have the user udpate the text boxes (there is more to
this project than what is shown of course), click the Update button on the
page, and apply the changes.
I tried Me.RegistrationE11_1.FindControl("RegIDE1") but the resulting type
is Nothing.
What is the syntax to look at all the textbox "RegIDE1" values from the
repeater on the user control in the main page?