Simon Cripps
asked on
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
I'm trying to updat a SQL datasoure using a control parameter and am getting the message
"Could not find control 'form1$Content2$DataList1$
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();
http://forums.asp.net/p/1461823/3361565.aspx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.