• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 633
  • Last Modified:

Could not find control 'xxx' in ControlParameter 'yyy'.

Hi,
I'm trying to updat a SQL datasoure using a control parameter and am getting the message
"Could not find control 'form1$Content2$DataList1$name' in ControlParameter 'AWCname'."
The code is attached below I have include the $ to try and identify the correct object (which is contained in a page within master page) but this does not appear to work. Any suggestions as to the issue.
Kind regards

<EditItemTemplate>
                 AWCname:
                <asp:Label ID="AWCnameLabel" runat="server" Text='<%# Eval("AWCname") %>' />
                <br />
                <asp:textbox id="name" runat="server"
               text='<%# ( ( DataRowView ) Container.DataItem ) [ "AWCname" ] %>' />
<br />
                <asp:linkbutton ID="Linkbutton2" commandname="update" runat="server" text="Update" />
               <asp:linkbutton ID="Linkbutton3" commandname="cancel" runat="server" text="Cancel" />
</EditItemTemplate>


#########Then further down the code fro SqlDataSource2 is...###############

UpdateCommand="UPDATE AWCampaign SET AWCname = @AWCname WHERE (AWCCampaignID = @AWCCampaignID)">
        <UpdateParameters>
              <asp:ControlParameter ControlID="form1$Content2$DataList1$name" Name="AWCname" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="lblGetCampaign" Name="AWCCampaignID" PropertyName="Text" Type="Int32" />
        </UpdateParameters>

##############  on the source code is ############

 public void myListUpdateHandler(Object src, DataListCommandEventArgs e)

SqlDataSource2.Update();

Open in new window

0
Simon Cripps
Asked:
Simon Cripps
1 Solution
 
Kumaraswamy RCommented:
0
 
Simon CrippsOwnerAuthor Commented:
Found the solution in
http://msdn.microsoft.com/en-us/library/90xwe9s3.aspx
Cheers for the assistance anyway
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now