Passing Control Value from Control in Tab Container to ObjectDataSource
Using VB.NET, VS2005, ASP.NET 2.0 and Ajax Control Toolkit.
I have a GridView connected to an ObjectDataSource. The SelectMethod on my ObjectDataSource is expecting a parameter "First_Name" and I want to pass this value from a TextBox (txtFirst_Name) on my form. The difficulty is that the TextBox is within an ajaxToolkit TabContainer control.
When I go through the SmartTags - Configure Datasource wizard, I identify the Parameter, choose control as the source and the wizard actually shows me "txtFirst_Name" as one of the available controls so I select it. When I run my application, I get an error that it cannot find "txtFirst_Name". This makes sense to me as the control is within the panel on the Tab Container.
So, I go back and change the control to "CType(tab.FindControl("txtFirst_Name"), TextBox).Text.Trim". I know this code works in my code-behind as I use it elsewhere. Problem is the ObjectDataSource still cannot find the control.
How do I pass in the value to the ObjectDataSource?