|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Issues with OnTextChanged using <asp:RepeaterTextBox and Labels values when the event fires as they are populated by a <asp:repeater and so don't have values. If I try to give the repeater values by removing if (!IsPostBack) {} from the Page_Load() method then my method is not called by the OnTextChanged event. There is probably a limitation with my understanding of the event model. How should I be getting OnTextChanged events from a <asp:repeater component and getting details about the values from the other controls of the <ItemTemplate> line that caused the event to trigger? Thanks in advance Hi,
if you have specific problems can you show the code? Anyways, if you get TextChanged event to be raised, you can get to the current repeater's item via sender (first argument in event handler method) with code as follows: RepeaterItem ritem =(RepeaterItem)((Control)sender).NamingContainer; It would be the the parent item of the TextBox which raises this specific TextChanged event. Then getting to other controls on the same item would be just running FindControl againts the RepeaterItem Label lbl=(Label)ritem.FindControl("Label1"); and so on Show quoteHide quote "Fred Dag" <fred***@hostvilleit.com> wrote in message news:u6PZkukEGHA.1028@TK2MSFTNGP11.phx.gbl... > As far as I can work out when using the OnTextChanged event I cannot get > the TextBox and Labels values when the event fires as they are populated > by a <asp:repeater and so don't have values. > > If I try to give the repeater values by removing > if (!IsPostBack) > > {} > > from the > > Page_Load() method then my method is not called by the OnTextChanged > event. > > There is probably a limitation with my understanding of the event model. > > How should I be getting OnTextChanged events from a <asp:repeater > component and getting details about the values from the other controls of > the <ItemTemplate> line that caused the event to trigger? > > > > Thanks in advance > > >
Other interesting topics
HttpWeb Request from Class Library fails to 500
How do I convert a DataSet to a String from a WebService Password Field ASP.net 2.0 GridView edit mode problems Switching from http to https and back call functions by pointer? Interacting with Outlook Q: DateTime Difference Q: datetime difference synchronize folder contents |
|||||||||||||||||||||||