I don't see anything wrong with your parameter, but it would really help if you would post the entire page, and any code that has to do with running this query. And it makes things a lot more readable if you use the Insert Code tool. If you need instructions,
see my How to use the Forums' "Insert Code" tool post.
If I give you a useful answer, please click the ANSWER button. (Please do this for ALL posts that are really useful.)Edward W. McCarroll
There isn't much out of the ordinary I can show you really.
I have 3 gridviews, 1 in each tabControl. I wish to include a texbox search for each gridView in it's residing tab, that's when the above error is thrown.
Here's my edited code, minus the dataSource's, It has to be due to the fact that they're in the Ajax tabcontainer ?
callan1
Member
146 Points
462 Posts
Could not find control 'txtSurname' in ControlParameter 'Surname'.
Feb 21, 2011 10:14 AM|LINK
Hi All
Can someone please assist me with the following:
I am trying to add a textbox search to a gridView. However I am recieving the below error
</div> </div>Could not find control 'txtSearch' in ControlParameter 'Surname'.
I've declared the parameter witihin its own dataSource, as follows:
<
asp:ControlParameter ControlID="txtSearch" Name="Surname" PropertyName="Text" />
However my problem may be that both the gridview & textBox search are inside an 'AJAX TabPanel'
Do I need to declare the parameter differently? If so...how?
WombatEd
Contributor
4092 Points
1055 Posts
Re: Could not find control 'txtSurname' in ControlParameter 'Surname'.
Feb 21, 2011 06:41 PM|LINK
I don't see anything wrong with your parameter, but it would really help if you would post the entire page, and any code that has to do with running this query. And it makes things a lot more readable if you use the Insert Code tool. If you need instructions, see my How to use the Forums' "Insert Code" tool post.
If I give you a useful answer, please click the ANSWER button. (Please do this for ALL posts that are really useful.)
Edward W. McCarroll
callan1
Member
146 Points
462 Posts
Re: Could not find control 'txtSurname' in ControlParameter 'Surname'.
Feb 25, 2011 08:59 AM|LINK
Ok, thank you for your reply.
There isn't much out of the ordinary I can show you really.
I have 3 gridviews, 1 in each tabControl. I wish to include a texbox search for each gridView in it's residing tab, that's when the above error is thrown.
Here's my edited code, minus the dataSource's, It has to be due to the fact that they're in the Ajax tabcontainer ?
<cc1:tabcontainer runat="server" OnClientActiveTabChanged="ActiveTabChanged" ID="tabContainer" ActiveTabIndex="0" Width="950px"> <cc1:TabPanel ID="tab1" runat="server" HeaderText="blar"> <contentTemplate> <br /> <asp:TextBox ID="txtSurnameSearch" runat="server" MaxLength="25"></asp:TextBox> <asp:Button ID="btnSearch" runat="server" Text="Search" /> <asp:GridView ID="gv1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" DataSourceID="ds1" ForeColor="#333333" GridLines="None"> <Columns> <asp:BoundField DataField="Submission Date" HeaderText="SUBMISSION DATE" SortExpression="Submission Date" dataformatstring="{0:dd/MM/yyyy}" HtmlEncode="False"> <asp:HyperLinkField DataNavigateUrlFields="...." DataNavigateUrlFormatString="form.aspx?.... Text="view" /> </Columns> </asp:GridView> </contentTemplate> </cc1:TabPanel> <cc1:TabPanel ID="tab2" runat="server" HeaderText="blar"> <contentTemplate> <asp:GridView ID="gv2" runat="server" .... /> </asp:GridView> </contentTemplate> </cc1:TabPanel> <cc1:TabPanel ID="tab3" runat="server" HeaderText="blar"> <contentTemplate> <asp:GridView ID="gv3" runat="server" AllowPaging="True" ... </asp:GridView> </contentTemplate> </cc1:TabPanel> </cc1:tabcontainer>I'd appreciate any assistance with this
WombatEd
Contributor
4092 Points
1055 Posts
Re: Could not find control 'txtSurname' in ControlParameter 'Surname'.
Feb 28, 2011 01:35 PM|LINK
I suspect the problem has to do with the datasources, but if you don't post them, I can't look at them.
Post the entire page, including any routines in the code that manipulate the grids or the datasources.
If I give you a useful answer, please click the ANSWER button. (Please do this for ALL posts that are really useful.)
Edward W. McCarroll