thx for replying again Naveenj,
This should be the code afaik:
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim gvr As GridViewRow = TryCast((DirectCast(sender, Button)).Parent.Parent, GridViewRow) DirectCast(gvr.FindControl("Label2"), Label).Text = TextBox1.Text
End Sub
The problem now is that sender in the first line has to be the button1 in the gridview. Now it is button2 below the textbox1 that needs to send the edited text back to the gridview.
I tried to declare a public variable:
Public obj as Object
and assign:
obj = sender
at the eventclick of button1.
But the value of obj is lost when the button2 event fires. So if I can keep the value of sender from button1 my problem seems to be solved.