A
Ashish Bandi via .NET 247
Hi all,
I am looking for some help on Reapeter control.
My repeater control has a textbox and label control in the itemtemplate. How can i access the values of these controls (textbox and label) in the body of the DisplayRepeater event handler (handling RepeaterItemEventArgs) ..
<asp:repeater id="myRepeater" runat="server" OnItemDataBound="DisplayRepeater">
<itemtemplate>
<asp:TextBox ID="rptxtQuantity" Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Quantity") %>'></asp:TextBox>
<asp:Label ID=rplblPrice runat=server></asp:Label>
</itemtemplate>
<alternatingitemtemplate>
// what should go here
</alternatingitemtemplate>
<footertemplate>
</footertemplate>
Also, if I place the same controls in the alternatingitemtemplate (change the background color etc.), it creates a name conflict. How to avoid that.
Thanks for your help in advance.
I am looking for some help on Reapeter control.
My repeater control has a textbox and label control in the itemtemplate. How can i access the values of these controls (textbox and label) in the body of the DisplayRepeater event handler (handling RepeaterItemEventArgs) ..
<asp:repeater id="myRepeater" runat="server" OnItemDataBound="DisplayRepeater">
<itemtemplate>
<asp:TextBox ID="rptxtQuantity" Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Quantity") %>'></asp:TextBox>
<asp:Label ID=rplblPrice runat=server></asp:Label>
</itemtemplate>
<alternatingitemtemplate>
// what should go here
</alternatingitemtemplate>
<footertemplate>
</footertemplate>
Also, if I place the same controls in the alternatingitemtemplate (change the background color etc.), it creates a name conflict. How to avoid that.
Thanks for your help in advance.