|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Textbox inside a repeater. how to access datarow in post back event.I have a textbox inside a repeart control, autopostback set to true for that textbox. When the value of this textbox changes, I need to access current row and update database. Repeater is bind to a dataset. VS.NET generate a below event on double click. However, I did not see any way to access current row. Public Sub TxtQuantity_TextChanged(ByVal sender As Object, ByVal e As System. EventArgs) response.write("it is here") End Sub How can access the datarow on repeater for that event??? regards, Guoqi Zheng http://www.ureader.com Hi,
that data row item (DataRowView in this case) exists only when dataBind is called (on the same request after you call dataBind for the control) and due to performance reasons it doesn't exist at postback (the repeater row controls are recreated on postback and viewstate restored to them) You could store IDs of the row into the repeater's row (item) with TextBoxes or literal controls having Visible="False" so that they'd be carried with the ViewState. When you need the keys, locate the controls in the same row (you can access the RepeaterItem via TextBox's NamingContainer property) and read the keys from them. Show quoteHide quote "guoqi zheng" <n*@sorry.com> wrote in message news:2bce2150a72d4797a5c728dc35e483a7@ureader.com... > Dear sir, > > I have a textbox inside a repeart control, autopostback set to true for > that > textbox. When the value of this textbox changes, I need to access current > row and update database. > > Repeater is bind to a dataset. VS.NET generate a below event on double > click. > However, I did not see any way to access current row. > > Public Sub TxtQuantity_TextChanged(ByVal sender As Object, ByVal e As > System. > EventArgs) > > response.write("it is here") > > End Sub > > How can access the datarow on repeater for that event??? > > regards, > > Guoqi Zheng > http://www.ureader.com
Other interesting topics
ASP.NET stopped working
Viewstate String InvalidCastException ASP.NET tells me my table doesn't have a primary key how to determine .NET framework version Microsoft Bug Does CompareValidator work for the date in dd-mmm-yyyy format? Munging URLs to store data OnPreRender ??? What is ? Transparent images somebody help me answer this? |
|||||||||||||||||||||||