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>
全都可以放,怎么不可以放了
[解决办法]
<asp:ScriptManager ID="aa" runat="server"/> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:GridView ID="GridView1" runat="server"> </asp:GridView> </ContentTemplate> </asp:UpdatePanel>
[解决办法]
<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:TextBox ID="TextBox1" runat="server" Text='<%#Eval("pdate") %>'></asp:TextBox>--%> </ItemTemplate> <HeaderStyle HorizontalAlign="Center" Width="5%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:TextBox ID="mm" MaxLength="2" Width="30px" runat="server" Text='<%#Eval("mm") %>'></asp:TextBox>- </ItemTemplate> <HeaderStyle HorizontalAlign="Left" Width="1%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:TextBox ID="dd" MaxLength="2" Width="30px" runat="server" Text='<%#Eval("dd") %>'></asp:TextBox> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" Width="4%" /> </asp:TemplateField> <asp:TemplateField HeaderText="Payment Amount"> <ItemTemplate> <asp:TextBox ID="TextBox2" Width="70px" runat="server" Text='<%# Bind("pamount") %>'></asp:TextBox> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" Width="8%" /> </asp:TemplateField> <asp:TemplateField HeaderText="Paid Date"> <ItemTemplate> <%# Eval("paid_date") %> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" Width="6%" /> </asp:TemplateField> <asp:TemplateField HeaderText="Cheque No."> <ItemTemplate> <%# Eval("cheque") %> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" Width="6%" /> </asp:TemplateField> <asp:TemplateField HeaderText="Payee"> <ItemTemplate> <%# Eval("payee") %> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" Width="5%" /> </asp:TemplateField> <asp:TemplateField HeaderText="Remarks"> <ItemTemplate> <%# Eval("payremarks") %> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" Width="5%" /> </asp:TemplateField> </Columns> </asp:GridView> <%--</asp:Panel>--%> <ContentTemplate> </asp:UpdatePanel>