|
-
Apr 10th, 2008, 05:38 PM
#1
GridView "FindControl" .Net Best Way
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|