Maybe I just don\'t know .NET well enough yet, but I have yet to see a satisfactory way to implement this simple VB6 code easily in .NET (assume this code is on a form with
The same click event can handle the button presses from multiple buttons in .Net. You could then add the the text box to find in the Tag property?
Private Sub AllButton_Click(sender As Object, e As EventArgs) Handles Button1.Click, Button2.Click, Button3.Click
Dim c As Control = CType(sender, Control)
Dim t As TextBox = FindControl(CType(c.Tag, String))
If t Is Not Nothing Then
t.Text = "Clicked"
End If
End Sub