日期:2014-05-18  浏览次数:20444 次

updatepanel里面啥都不能放!!!要了干什么
updatapanel里面不能放table,不能放gridview,放什么报什么错!!!这东西太鸡肋了!!!!是真的不能放还是我用不来啊

------解决方案--------------------
<asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline">
<ContentTemplate>
这里放你的控件
</ContentTemplate>
</asp:UpdatePanel>
------解决方案--------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PasswordStrength.aspx.cs" Inherits="PasswordStrength" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<!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">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

</div>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table>
<tr>
<td>
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
</td>
</tr>

</table>

</ContentTemplate>
</asp:UpdatePanel>
 
</form>
</body>
</html>



全都可以放,怎么不可以放了
------解决方案--------------------
HTML code

 <asp:ScriptManager ID="aa" runat="server"/>
     <asp:UpdatePanel ID="UpdatePanel1" runat="server">
         <ContentTemplate>
             <asp:GridView ID="GridView1" runat="server">
             </asp:GridView>
         </ContentTemplate>
        
              </asp:UpdatePanel>

------解决方案--------------------
HTML code

 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
              <%-- <asp:Panel ID="Panel1" runat="server">--%>
                    <asp:GridView ID="GridView1" runat="server"  GridLines="None" Width="81%" 
                        AutoGenerateColumns="False">
                        <Columns>
                            <asp:TemplateField HeaderText="Payment Phase">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" Text='<%#Eval("pp") %>' runat="server"></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="left"  Width="8%" />
                            </asp:TemplateField> 
                            <asp:TemplateField HeaderText="Payment Date">
                      <ItemTemplate>
                    <asp:TextBox ID="yyyy" MaxLength="4" Width="85px" runat="server" Text='<%# Eval("yyyy") %>'></asp:TextBox>-
                        <%--  <asp:T