I have a a GridView on a webpage that has controls in it's <EmptyDataTemplate>.

Which of the following is the best way to get data from the TextBox:

1. CType(sender, Button).NamingContainer.FindControl("TextBoxAction")

2. GridViewEditActions.Controls(0).Controls(0).FindControl("TextBoxAction")


Option 1 is used under a buttons click event that is co-located with the TextBox.


Thoughts.