I have a aspx page that has a UpdatePanel and a asp timer. the timer tick is the trigger for the update panel.
If add anything to the update panel (even a space!) Visual Studio automagically adds the following
<Triggers>
<System.Web.UI.AsyncPostBackTrigger ControlID="tm1" EventName="Tick"></System.Web.UI.AsyncPostBackTrigger>
</Triggers>
Even though the page has already registered the following (albeit in the same triggers section)
<Triggers>
<asp:AsyncPostBackTrigger ControlID="tm1" EventName="Tick" /> </Triggers>
So my questions are these
1) What is the difference between asp:AsyncPostBackTrigger and System.Web.UI.AsyncPostBackTrigger 2) Why does Visual Studio persist on adding this line which then breaks the page as it errors with the message System.Web.UI.UpdatePanelTriggerCollection must have items of type 'System.Web.UI.UpdatePanelTrigger'. 'System.Web.UI.AsyncPostBackTrigger' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'. 3) How can I stop this???
I am using Visual Studio 2008 targeting a .Net 2.0 Web application project.
-
Do you have the AJAX control library registered correctly for your project? Since you're targeting .Net 2.0, you'll need to add the AJAX library explicitly (it's not built in until .Net 3.5).