You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am also using the AjaxControlToolkit.StaticResources nuget package. I get the same result without this package too.
The installation method
[ x ] NuGet package
Minimal steps to reproduce the bug
Accordian is loaded on page_load and has a link button in the content area. Using headertemplate and contenttemplate. When you link the button the first time the page works. The postback is fired and the accordian's ItemCommand event is handled. In this method I am rebinding the accordian in order to update the contents of the panels based on the button that was just clicked. Here is where the problem occurs. The panel looks like it updated correctly, but if you click the button again in one of the panes, the ItemCommand event is not handled, however the postback did get triggered. Now if you click the button again the ItemCommand event is handled correctly, but since this will cause the accordian to get databound again you continue to get the same issue.
I did find this old post related to the same issue and the fix supposedly fixed the issue. I looked at the .cs file on github and it does not have the INamingContainer implemented as mentioned in the following post: https://forums.asp.net/p/1152731/1892385.aspx#1892385
Couple of details of my project:
update panel - update panel - multiview - accordian
So the accordian is in a view which is in an updatepanel which is in a parent update panel. I am triggering updates on the update panels, but still have the same result.
.Net Framework 4.6.1
Expected result
The link button should trigger the ItemCommand event on each post back.
Browser(s) used
FF Dev
A site deployment method
[ x ] VS development web-server
Example project
The following is a simple example showing this issue. I left out the update panels and multiview to make it as simple as possible. You will need to install packages from nuget since I deleted them to make the project size smaller.
I did some additional testing. I cloned the ajaxtoolkit project and added that iNamingContainer value to the Accordion.cs file. Built the solution and then pointed my test project to the ajaxtoolkit.dll and I still got the same results. Then I added iNamingContainer to AccordionPane.cs and now the ItemCommand event is trigger every postback instead of ever other postback. I even nested the accordian in an update panel in my test project and it still worked.
The AJAX Control Toolkit 17.1.1>
I am also using the AjaxControlToolkit.StaticResources nuget package. I get the same result without this package too.
The installation method
Minimal steps to reproduce the bug
Accordian is loaded on page_load and has a link button in the content area. Using headertemplate and contenttemplate. When you link the button the first time the page works. The postback is fired and the accordian's ItemCommand event is handled. In this method I am rebinding the accordian in order to update the contents of the panels based on the button that was just clicked. Here is where the problem occurs. The panel looks like it updated correctly, but if you click the button again in one of the panes, the ItemCommand event is not handled, however the postback did get triggered. Now if you click the button again the ItemCommand event is handled correctly, but since this will cause the accordian to get databound again you continue to get the same issue.
I did find this old post related to the same issue and the fix supposedly fixed the issue. I looked at the .cs file on github and it does not have the INamingContainer implemented as mentioned in the following post: https://forums.asp.net/p/1152731/1892385.aspx#1892385
Couple of details of my project:
update panel - update panel - multiview - accordian
So the accordian is in a view which is in an updatepanel which is in a parent update panel. I am triggering updates on the update panels, but still have the same result.
.Net Framework 4.6.1
Expected result
The link button should trigger the ItemCommand event on each post back.
Browser(s) used
FF Dev
A site deployment method
Example project
The following is a simple example showing this issue. I left out the update panels and multiview to make it as simple as possible. You will need to install packages from nuget since I deleted them to make the project size smaller.
accordian_test.zip
The text was updated successfully, but these errors were encountered: