UpdatePanel1 服务器标记的格式不正确 报错
页面上有scriptmanager为何报错?<form id="form1" runat="server">
<div style="height: 100%; width:100%; background-color: #E8E3E8;">      
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
   <ContentTemplate>    <table border="1" width="100%">
        <tr>
            <td align="center" valign="middle" width="25%" class="style3">
                <div>                  
        <asp:Label ID="StuNum" runat="server" Text="Label"></asp:Label>
            <br />
        <asp:Label ID="StuName" runat="server" Text="Label"></asp:Label>
    
        </div>
            </td>
            <td align="center" valign="middle" class="style3">
                <asp:Label ID="lblCourse" runat="server" Text="在线考试" Font-Size="XX-Large" 
                style="font-weight: 700"></asp:Label>
            
            </td>
            <td align="center" valign="middle" width="25%" class="style3">
                考试时间<br />
        <div id="DateDiv" >
        </div>
            </td>
        </tr>
        <tr>
            <td class="style4" colspan="3">
            <div>
               <asp:Button ID="TimeOutSubmit" runat="server" 
               onclick="TimeOutSubmit_Click" BorderWidth="0px" Height="0px" />
                         <asp:HiddenField ID="time" runat="server" />
                         <input id="questionnum" type="hidden" runat="server"/>
                        </div>
                </td>
        </tr>           
        <tr>
            <td align="center" colspan="3" valign="middle">
            <div>
             题目跳转至:
        <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
               onselectedindexchanged="DropDownList1_SelectedIndexChanged" 
               style="height: 22px" Height="26px" Width="102px">
        </asp:DropDownList>
             <br />
             <uc1:QuestionsControl ID="QuestionsControl1" runat="server" />
            </div>
                </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="center" valign="middle">
                控件说明</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="center" valign="middle">
            <div runat="server"style="width:600px; text-align:left; margin-left:auto; margin-right:auto; margin-top:0px; height:83px;"  id="MainSub">
                         第<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                    题&nbsp;&nbsp; 
                         <br />
                         <br />
                题 目:<asp:TextBox ID="TextBox1" runat="server" Width="521px"></asp:TextBox></div>
                         </td>
                    
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td align="right">
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                            <div id="mydiv" runat="server" visible="false">
                            请作答:</div></td>
            <td align="center" valign="middle">
                题目控件<br />
         <asp:RadioButtonList ID="RadioButtonList1" runat="server">
                        <asp:ListItem></asp:ListItem>
                        <asp:ListItem></asp:ListItem>
                        <asp:ListItem></asp:ListItem>
                       <asp:ListItem></asp:ListItem>
                    </asp:RadioButtonList>
                        
                            <asp:TextBox ID="TextBox2" runat="server" Height="181px" 
                                TextMode="MultiLine" Visible="False" Width="100%"></asp:TextBox>
                        </td>
              </tr>           
        <tr>
            <td colspan="3">
                <table border="1" width="100%">
                    <tr>
                        <td align="right" width="33%">
                       <asp:Button ID="Button1" runat="server" Text="上一题" onclick="Button1_Click" 
                           Width="67px" Height="26px" />
                        </td>
                        <td align="center" width="33%">
                       <asp:Button ID="TimeSubmit" runat="server" 
               Text="交卷" onclick="submit_Click" style="height: 26px" Width="66px" /></td>
                        <td width="33%">
                       <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="下一题" 
                           Width="66px" Height="27px" />
                        </td>
                    </tr>
                    </table>
            </td>
        </tr>    
    </table>
   
    </ContentTemplate>
 </asp:UpdatePanel>
     </div>
               <asp:UpdateProgress ID="UpdateProgress1" runat="server">
       <ProgressTemplate>
       <div style="margin-left:10%; width: 913px; margin-top:-600px; text-align:center; height: 594px; color: #CCCCFF; font-weight: bold;">
           <br />
           <br />
           <br />
           <br />
           <br />
           <br />
           <br />
           <br />
           <br />
           <br />
       正在读取,请稍候。
       </div>
       </ProgressTemplate>
            </asp:UpdateProgress>             
    </form>

解决方案 »

  1.   

    最好的方法是重新建立一个ajax的网站,然后把他自动生成的config里面的复制过来 
      

  2.   

    错误就是 vs设计页面上 UpdatePanel1控件 服务器标记的格式不正确 
      

  3.   

    估计是UpdateProgress控件没有设置AssociatedUpdatePanelID的属性比如要控制UpdatePanel,应该是这样的  <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel">
           <ProgressTemplate>
           <div style="margin-left:10%; width: 913px; margin-top:-600px; text-align:center; height: 594px; color: #CCCCFF; font-weight: bold;">
               <br />
               <br />
               <br />
               <br />
               <br />
               <br />
               <br />
               <br />
               <br />
               <br />
           正在读取,请稍候。
           </div>
           </ProgressTemplate>
                </asp:UpdateProgress>             
    你看一下喽!
      

  4.   

    UpdatePanel有时候会出现一些奇怪的问题,比如有时候直接在设计页拖动一些控件会出现这些情况,我遇到过,但是直接在HTML源码那里修改就没事。
    楼主可以在页面一步一步添加控件,添加一些就编译一次,就可以看到问题在那了。这个方法比较笨。
      

  5.   

    我看了一下,证明没错,你使用的vs05的吧!05中我经常出现这种问题,关了,重新打开编译一下,或者重新建立一个在把代码贴进去就OK了,我现在用08就没出现过这种问题!
      

  6.   

    把ScriptManager和UpdatePanel重新拖一组。UpdatePanel的 UpdateMode属性设为Conditional