请问一下 我要现有web项目中使用Updatepanel 会提示有错误:Sys未定义  难道用这个控件还要新建一个asp.net AJAX-Enabled Web Site 才行吗?

解决方案 »

  1.   

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="newItemQualityInfo.aspx.cs" Inherits="basicData_newItemQualityInfo" %><%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        Namespace="System.Web.UI" TagPrefix="asp" %><!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>无标题页</title>
        <link href="../css/css.css" rel="stylesheet" type="text/css" />
        <base target="_self"></base>
    </head>
    <body class="dialogWindow">
        <form id="theForm" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div>
         <table width="100%" border="0" cellpadding="0" cellspacing="0" >
                <tr>
                    <td align="left" valign="middle" width="6">
                        <img src="../images/main_top_left.jpg" width="6" height="27px"></td>
                    <td align="left" valign="middle" bgcolor="#b6c3d6">
                        <img src="../images/dangqianweizhitubiao.gif" width="14" height="14" align="absMiddle">基础数据-新建监测质量类别</td>
                    <td align="left" valign="middle" width="6">
                        <img src="../images/main_top_right.jpg" width="6" height="27px"></td>
                </tr>
        </table>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>            
            <table cellpadding="0" width="100%" cellspacing="0" border="1" class="inputTable">
               
                <tr>
                    <td align="right">项目类别:</td>
                    <td colspan="3">&nbsp;
                        <asp:DropDownList ID="ddlItemType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlItemType_SelectedIndexChanged" >
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td align="right">项目名称:</td>
                    <td>&nbsp;
                        <asp:DropDownList ID="ddlName" runat="server">
                        </asp:DropDownList></td>
                    <td align="right">级别名称:</td>
                    <td>&nbsp;
                        <asp:DropDownList ID="ddlLevel" runat="server">
                        </asp:DropDownList></td>
                </tr>
            </table>
               </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        </form>
    </body>
    </html>
      

  2.   

    http://hi.baidu.com/木头人/blog/item/1a62d109e90d5282d0581b6a.html
    上面好象有
      

  3.   

    难道用这个控件还要新建一个asp.net AJAX-Enabled Web Site 才行吗?
    =======这样最好,因为WEBCONFIG里会帮你配好的
      

  4.   

    ajax该配得都要配好,该装的都要装好才能跑起来。
      

  5.   

    正好遇到过这个问题,在webconfig中加入:
    <httpHandlers>
             <remove verb="*" path="*.asmx"/>
             <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
             <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
             <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
    </httpHandlers>
    <compilation debug="true">
     <assemblies>
             <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </assemblies>
    </compilation>注意不要把compilation节重复了。