Erro AJAX - Componente Update Panel.
05/05/2008
0
Estou tentando aprender AJAX. Neste exemplo, estou tendo problemas com um update panel.
Surge este mensagem quando compilo:
The control with ID ´UpdatePanel1´ requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.
O código:
<¬@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" ¬> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> <style type="text/css"> #form1 { height: 520px; } </style> </head> <body> <form id="form1" runat="server"> <asp:DropDownList ID="DropDownList1" runat="server" Height="50px" Width="202px"> <asp:ListItem Value="true">Completo</asp:ListItem> <asp:ListItem Value="false">Incompleto</asp:ListItem> </asp:DropDownList> <br /> <br /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="ProjetoId" DataSourceID="ObjectDataSource1" GridLines="Horizontal"> <FooterStyle BackColor="#B5C7DE" ForeColor="4A3C8C" /> <RowStyle BackColor="E7E7FF" ForeColor="4A3C8C" /> <Columns> <asp:CommandField ShowEditButton="True" /> <asp:BoundField DataField="ProjetoId" HeaderText="ProjetoId" InsertVisible="False" ReadOnly="True" SortExpression="ProjetoId" /> <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" /> <asp:CheckBoxField DataField="Completa" HeaderText="Completa" SortExpression="Completa" /> </Columns> <PagerStyle BackColor="#E7E7FF" ForeColor="4A3C8C" HorizontalAlign="Right" /> <SelectedRowStyle BackColor="738A9C" Font-Bold="True" ForeColor="F7F7F7" /> <HeaderStyle BackColor="4A3C8C" Font-Bold="True" ForeColor="F7F7F7" /> <AlternatingRowStyle BackColor="F7F7F7" /> </asp:GridView> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="original_" SelectMethod="GetProjetosPorStatus" TypeName="DataSet1TableAdapters.ProjetosTableAdapter" UpdateMethod="Update"> <DeleteParameters> <asp:Parameter Name="Original_ProjetoId" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="Nome" Type="String" /> <asp:Parameter Name="Completa" Type="Boolean" /> <asp:Parameter Name="Original_ProjetoId" Type="Int32" /> </UpdateParameters> <SelectParameters> <asp:ControlParameter ControlID="DropDownList1" Name="Completa" PropertyName="SelectedValue" Type="Boolean" /> </SelectParameters> <InsertParameters> <asp:Parameter Name="Nome" Type="String" /> <asp:Parameter Name="Completa" Type="Boolean" /> </InsertParameters> </asp:ObjectDataSource> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged" /> </Triggers> </asp:UpdatePanel> </form> </body> </html> [quote] Se alguém puder ajudar agradeço. Pesquisei aqui no fórum e em outros mas não obtive êxito. PS.: Utilizo Visual Studio 2008 e Microsoft .NET Frameowrk 3.5 Att Dalton
Dbergkamps10