Solved

Element Triggers not supported

Posted on 2008-10-14
8
1,274 Views
Last Modified: 2012-06-27
I have a page based of the "Scotts to do list" tutorial(using adjax). Within this program I tried to use a trigger to update a update pannel.
<triggers>
            <asp:AsyncPostBackTrigger runat="server" EventName="SelectedIndexChanger" ControlID="DropDownList1" />
</asp:AsyncPostBackTrigger>
       
        </triggers>

But visual Web developer 2008 express says "Element triggers is not supported"

I have enabled 3.5 in visual studio.
0
Comment
Question by:soccerman777
  • 4
  • 4
8 Comments
 
LVL 22

Expert Comment

by:prairiedog
ID: 22712126
>>><asp:AsyncPostBackTrigger runat="server" EventName="SelectedIndexChanger" ControlID="DropDownList1" />
</asp:AsyncPostBackTrigger>           <===remove this line. You already have a close tag above it: "/>"
0
 

Author Comment

by:soccerman777
ID: 22712330
buy the way I am doing this on my development box (xp professional  iis 5.1). in iis 5.1 it only shows me using asp.net 2.05 but I do have .net framework 3.5 installed and I have set the file to 3.5 in visual studio.
0
 
LVL 22

Expert Comment

by:prairiedog
ID: 22712703
The Framework 3.5 uses the 2.0 CLR, so your settins are correct.
BTW, have your tried my comment?
0
 

Author Comment

by:soccerman777
ID: 22715209
yes I did try it. It did not work.  I am wondering if there is something to install that I need to use triggers.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 22

Expert Comment

by:prairiedog
ID: 22715949
Can you post more code?
0
 

Author Comment

by:soccerman777
ID: 22716334

Here is my content page
<%@ Page Language="VB" MasterPageFile="~/poMaster.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" Debug="true" title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:Label style="top: 300px; left: 150px; position: absolute; height: 22px; width: 42px"  
        ID="Label1" runat="server" Text="Vendor"></asp:Label>
    <asp:DropDownList style="top: 300px; left: 200px; position: absolute; height: 22px; width: 76px"
        ID="DropDownList1" runat="server" AutoPostBack="True">
        <asp:ListItem Selected="True"></asp:ListItem>
        <asp:ListItem Value="%ro%">ro</asp:ListItem>
        <asp:ListItem Value="%bo%">bo</asp:ListItem>
    </asp:DropDownList>
    <div class="divsmalltext2">
    <asp:Label ID="vendorLabel" style="top: 350px; left: 150px; position: absolute; height: 22px; width: 42px" runat="server" Text="Vendor Results"></asp:Label>
   
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
       
                     
                   
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True"
        AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="pkey"
        DataSourceID="ObjectDataSource1"  CssClass="style1"
        alternatingrowstyle-CssClass="even" GridLines="None"
       
        style="top: 350px; left: 210px; position: absolute; height: 103px; width: 157px">
        <Columns>
            <asp:BoundField DataField="description" HeaderText="description"
                SortExpression="description" />
            <asp:BoundField DataField="pkey" HeaderText="pkey" InsertVisible="False"
                ReadOnly="True" SortExpression="pkey" />
            <asp:BoundField DataField="id" HeaderText="id" SortExpression="id" />
        </Columns>
        </asp:GridView>





       
       
       
       
       
       
       
       
       
           
            </ContentTemplate>
       
        </asp:UpdatePanel>
        <triggers>
        <asp:AsyncPostBackTrigger runat="server" EventName="SelectedIndexChanger" ControlID="DropDownList1" />
         </triggers>
    </div>
       
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
        OldValuesParameterFormatString="original_{0}" SelectMethod="Getvendors"
        TypeName="poDataSetTableAdapters.imtbl_contactTableAdapter">
        <SelectParameters>
            <asp:ControlParameter ControlID="DropDownList1" Name="search"
                PropertyName="SelectedValue" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </asp:Content>


Let me know if you need anything else
0
 
LVL 22

Accepted Solution

by:
prairiedog earned 500 total points
ID: 22716371
<Triggers> needs to be defined within <UpdatePanel> block, not outside it.
0
 

Author Closing Comment

by:soccerman777
ID: 31505923
Haha I did not even notice I had it outside the update panel.  
Hey keep a watch on my questions. I have been codeing asp.net for 3 weeks(I was a cold fusion developer) So I will be posting some pretty easy questions that I will need quick answers for.

Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
This video teaches users how to migrate an existing Wordpress website to a new domain.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now