首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

Ajax的有关问题,下列代码如果去掉<asp:UpdatePanel> </asp:UpdatePanel> 就可以正常运行

2012-03-03 
Ajax的问题,下列代码如果去掉asp:UpdatePanel /asp:UpdatePanel 就可以正常运行%@PageLanguage C#

Ajax的问题,下列代码如果去掉<asp:UpdatePanel> </asp:UpdatePanel> 就可以正常运行
<%@   Page   Language= "C# "   AutoEventWireup= "true "   CodeFile= "Default6.aspx.cs "   Inherits= "Default6 "   %>
<!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>
</head>
<body>
        <form   id= "form1 "   runat= "server ">
            <asp:ScriptManager   ID= "ScriptManager1 "   runat= "server "   EnablePageMethods= "True "   />
        <div>  
              <asp:UpdatePanel   ID= "UpdatePanel2 "   runat= "server "   >
                    <ContentTemplate>
                                <asp:PlaceHolder   ID= "PlaceHolder1 "   runat= "server ">  
                                <div   class= "demoarea ">
                        <div   >
                        <asp:LinkButton   ID= "lbtnAdd "     runat= "server "       CausesValidation=false     OnClick= "lbtnAdd_Click "> 新增 </asp:LinkButton>
                        <asp:LinkButton   ID= "LinkButton1 "       style= "display:none; "   runat= "server "   > LinkButton </asp:LinkButton>
                        </div>                              
                  <div>
                  <asp:Panel   ID= "Panel1 "   runat= "server "   Style= "display:   none "         Width=300   Height=200   BackColor= "LightGray "  CssClass= "modalPopup "   >
                    <asp:Panel     Width=100%   ID= "Panel3 "   runat= "server "   Style= "cursor:   move;background-color:#DDDDDD;border:solid   1px   Gray;color:Black ">
                                <div>
                                        <p> </p>
                                </div>
                    </asp:Panel>


                                <div   align=center   >
                      <p>
                                                <label   class= "sampleStyleB "> 名称 </label> <asp:TextBox   ID= "txtName "     CssClass=sampleStyleB     runat= "server "> </asp:TextBox>
                                                <asp:RequiredFieldValidator   runat= "server "   ID= "NReq "   ControlToValidate= "txtName "   ErrorMessage= " <b> Required   Field   Missing </b> <br   /> A   name   is   required. "   Display= "None "   />
                                                <ajaxToolkit:ValidatorCalloutExtender   runat= "Server "   ID= "NReqE "     TargetControlID= "NReq "         HighlightCssClass= "validatorCalloutHighlight "   />
                                        </p>
                                          <p>
                                              <label   class= "sampleStyleB "> 分类 </label> <asp:TextBox   ID= "txtCode "     CssClass=sampleStyleB     runat= "server "> </asp:TextBox> <asp:TextBox   ID= "txtID "       Width=0   Visible=false   CssClass=sampleStyleB     runat= "server "> </asp:TextBox>
                                                <asp:TextBox   ID= "txtAddOrEdit "   runat= "server "   CssClass= "sampleStyleB "   Visible= "false "
                                                        Width= "0 "> </asp:TextBox> </p>
                                        <p>
                                              <label     class= "sampleStyleB "   > 备注 </label> <asp:TextBox   ID= "txtRemarks "   CssClass=sampleStyleB   runat= "server "> </asp:TextBox>
                                        </p>


                                        <p>   </p>
                                        <p   style= "text-align:   center; ">
                                                <asp:Button   CssClass=sampleStyleB   ID= "OkButton "   runat= "server "   Text= "确定 "     Width=80   OnClick= "OkButton_Click "         />
                                                <asp:Button   CssClass=sampleStyleB   ID= "CancelButton "   runat= "server "     CausesValidation= "false "     Text= "取消 "   Width   =80   OnClick= "CancelButton_Click "   />
                                        </p>
                                </div>
                </asp:Panel>
                </div>
                               
                <ajaxToolkit:ModalPopupExtender   ID= "ModalPopupExtender "   runat= "server "  
                        TargetControlID= "LinkButton1 "
                        PopupControlID= "Panel1 "  
                        BackgroundCssClass= "modalBackground "  
                     
                        BehaviorID   = "OkButton "
                        CancelControlID= "CancelButton "  
                        DropShadow= "false "
                        PopupDragHandleControlID= "Panel3 "   />
</div>
                              </asp:PlaceHolder>
                    </ContentTemplate>
              </asp:UpdatePanel>
       
        </div>
        </form>
</body>
</html>


[解决办法]
提示什么错误啊
------解决方案--------------------



一般用ajaxpro2.dll工具包

热点排行