hi,
i have a repeater control bound to some xml that i load in. it renders fine and i get a number of rows flushed out to my aspx page.
one of the fields in these rows is a textbox, which i want to be updateable - so i have a button at the end of each row called update.
by using the commandArgument parameter on that button, i can pass it the row id, so i know which row's update button was clicked.
but how do i get the text from the textbox ? how do i distinguish which textbox it is
here's the aspx code:
and here's what i have for the vbCode :
so i basically need to know how to get the value from the textbox
thanks!
i have a repeater control bound to some xml that i load in. it renders fine and i get a number of rows flushed out to my aspx page.
one of the fields in these rows is a textbox, which i want to be updateable - so i have a button at the end of each row called update.
by using the commandArgument parameter on that button, i can pass it the row id, so i know which row's update button was clicked.
but how do i get the text from the textbox ? how do i distinguish which textbox it is
here's the aspx code:
Visual Basic:
<asp:Repeater id="rptConfs" runat="server">
<ItemTemplate>
<tr>
<td><%#container.dataitem("confirmno")%></td>
<td align="center"><INPUT id="txtParts" type="text" size="5" name="txtParts" runat="server" value=<%#container.dataitem("numberoflines")%>></td>
<td align="center"><asp:Button id="btnUpdate" OnClick="btnUpdate_Click" text="Update" commandArgument=<%# container.dataitem("CONFIRMNO") %> runat="server"></asp:Button></td>
</tr>
</ItemTemplate>
</asp:Repeater>
and here's what i have for the vbCode :
Visual Basic:
Public Sub btnUpdate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
' update record
Try
Dim confNo As String = sender.CommandArgument
response.write ("new value = " & .................)
response.end
Catch er As Exception
showError("ERROR: UpdateConf - " & er.ToString)
End Try
End Sub
so i basically need to know how to get the value from the textbox
thanks!