Monday, March 26, 2012

Trigger design-time error

At the begin, is all ok: when I open my project the controls was showed normally.
After first run, when I switch from html view to design-view the updatepanel control show this error:

Error Creating Control - Content1
'Triggers' could not be initialized. Details: 'Triggers' could not be added to the collection. Details: Object does not match target type.

This is my code:

<%

@dotnet.itags.org.PageLanguage="VB"MasterPageFile="~/MasterPage.master"AutoEventWireup="false"CodeFile="Ricerche.aspx.vb"Inherits="Ricerche"title="Ricerche" %>
<asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"runat="Server">
<atlas:ScriptManagerID="ScriptManager1"runat="server"EnablePartialRendering="true"EnableScriptGlobalization="false"></atlas:ScriptManager>
<asp:TextBoxID="TxtSearch"runat="server"></asp:TextBox>
<asp:ImageButtonID="ImageButton1"runat="server"ImageUrl="~/Images/Cerca.gif"/><br/><atlas:UpdatePanelID="UpdatePanel1"runat="server"Mode="Conditional">
<ContentTemplate>
<asp:GridViewID="GridView1"runat="server"AutoGenerateColumns="True"DataKeyNames="ID"></asp:GridView>
</ContentTemplate>
<Triggers>
<atlas:ControlEventTriggerControlID="ImageButton1"EventName="Click"/>
</Triggers>
</atlas:UpdatePanel>
</asp:Content>

I must say that I use April CTP of Atlas and Atlas controlToolkit too.
Now i try to delete triggers section and change update panel mode to always, and the page was displayed correctly. But if I insert again triggers section the error come back.
What I can do? thanks


I also just started getting the same design time error ..

Error Creating Control - Content1
'Triggers' could not be initialized. Details: 'Triggers' could not be added to the collection. Details: Object does not match target type.

And in my specific case, I have:

And .. I've been using pages that have a very similar setup for like 2 weeks without problems like this.
Then today, I started getting the 'Error Creating Control' message when I went from Source view of the asp page to the Design view.

<asp:Content id="content1"> <atlas:UpdatePanel id="updatePanel1" runat="server" mode="Conditional"> <ContentTemplate> ... <asp:GridView ... /> ... </ContentTemplate> <Triggers> <atlas:ControlEventTrigger ControlID="button1" EventName="Click" /> <atlas:ControlValueTrigger ControlID="ddl1" PropertyName="SelectedValue" /> </Triggers> </atlas:UpdatePanel> ... <asp:Button id="button1" runat="server" Text="Huh?"> ... <asp:DropDownList id="ddl1" runat="server" /> ...</asp:Content>
Need assistance with this problem .. thanks!
Hmm .. interesting, so .. I open up the project this morning. The problem I was having yesterday isn't occurring anymore. Not much has changed from yesterday to today, other than I've added more content to the page.
I believe this is a bug with the IDE not handeling the trigger well in design mode. I have had this exact same problem and fix it by restarting VS 2005.

For some reason, the error went away for me when I hit "Save"...

if that's any help

No comments:

Post a Comment