Last post Jul 24, 2019 02:27 AM by KathyW
Jul 24, 2019 12:23 AM|powderworks|LINK
Getting this error message
System.InvalidOperationException: A control with ID 'btnUpload_Click2' could not be found for the trigger in UpdatePanel 'UpdatePanel3'.
[InvalidOperationException: A control with ID 'btnUpload_Click2' could not be found for the trigger in UpdatePanel 'UpdatePanel3'.]
System.Web.UI.UpdatePanelControlTrigger.FindTargetControl(Boolean searchNamingContainers) +441246
Any ideas would be appreciated
Here is the Code
<asp:UpdatePanel ID="UpdatePanel3" runat="server">
<<asp:LinkButton ID="LinkButton4" runat="server" CssClass="btn btn-success" OnClick="btnUpload_Click2" Width="161px">
<span class="glyphicon glyphicon-upload"></span> Upload and Resize
Jul 24, 2019 12:51 AM|jzero|LINK
You set "btnUpload_Click2" as ControlID for PostBacktrigger, but it does not exist.
PostBackTrigger ControlID should be ID of control that you want act as trigger
Jul 24, 2019 02:12 AM|powderworks|LINK
Thanks for coming back to me.
I may be missing something here but the ID, btnUpload_Click2
is in the update panel of the Code I showed in the post.
I cant understand why I am getting that error message as the controlID is clearly in the updatepanel3. I must be missing something
Jul 24, 2019 02:27 AM|KathyW|LINK
What you are missing is that, no, the ID btnUpload_Click2 is not in the update panel code you showed us.
<asp:LinkButton ID="LinkButton4" runat="server" CssClass="btn btn-success" OnClick="btnUpload_Click2" Width="161px">
The ID is "LinkButton4". "btnUpload_Click2" is the name of a function you are calling onclick. (The code you showed also had <<asp:LinkButton .... , that is, an extra '<' in front. Was that a typo when you posted the code?)