贴代码出来看看,就知道了。
这是页面代码
<%@ Page Language="C#" MasterPageFile="~/MasterPage/Site.Master"
AutoEventWireup="true" CodeFile="OrderList.aspx.cs" Inherits="User_OrderList" %>
<%@ Register src="../Controls/OrderList.ascx" tagname="OrderList" tagprefix="uc1" %>
<asp:Content ID="Content4" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Contant" runat="server">
<div id="OrderList">
<uc1:OrderList ID="OrderList1" runat="server" />
</div>
</asp:Content>
控件页面代码
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="OrderList.ascx.cs" Inherits="Controls_OrderList" %>
<div>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" >
<ContentTemplate>
<asp:GridView ID="GVOrderList" runat="server" AutoGenerateColumns="False" Width="700px" AllowPaging="True"
onpageindexchanging="GVOrderList_PageIndexChanging" onrowdatabound="OrderList_RowDataBound" Font-Size="12px">
<Columns>
<asp:TemplateField ConvertEmptyStringToNull="False">
<HeaderTemplate >
<asp:Label ID="Label1" runat="server" Text="订单列表" Font-Bold="True" Font-Size="15px"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<table cellpadding="0" cellspacing="0" width="600px">
<tr><td>订单号:<asp:Label ID="Label3" runat="server" Text='<%# Eval("OrderID") %>'></asp:Label> </td>
<td>提交时间:<asp:Label ID="Label8" runat="server" Text='<%# Eval("OrderTime") %>'></asp:Label> </td>
<td>订单状态:<asp:Label ID="Label13" runat="server" Text='<%# Eval("OrderStatus") %>'></asp:Label> </td>
<td></td></tr>
<tr><td>付款方式:<asp:Label ID="Label14" runat="server" Text='<%# Eval("PayWay") %>'></asp:Label></td>
<td>配送方式:<asp:Label ID="Label15" runat="server" Text='<%# Eval("SendWay") %>'></asp:Label></td>
<td>商品数量:<asp:Label ID="Label16" runat="server" Text='<%# Eval("TotelNumber") %>'></asp:Label></td>
<td>商品总额:<asp:Label ID="Label17" runat="server" Text='<%# Eval("TotelPrice") %>'></asp:Label></td></tr>
<tr><td>收货人:<asp:Label ID="Label9" runat="server" Text='<%# Eval("ReceicerName") %>'></asp:Label></td>
<td>收获人地址:<asp:Label ID="Label10" runat="server" Text='<%# Eval("ReceicerAddr") %>'></asp:Label></td>
<td>收货人邮编:<asp:Label ID="Label11" runat="server" Text='<%# Eval("ReceicerPostcode") %>'></asp:Label></td>
<td>收货人电话:<asp:Label ID="Label12" runat="server" Text='<%# Eval("ReceicerPhone") %>'></asp:Label> </td></tr>
</table>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerStyle HorizontalAlign="Right"/>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
@荒野的呼唤: 前台绑定了 应该看得到视图设计效果不啊
@小柑: 谢谢了 原来GridView控件在包含它的页面中,点击页面视图设计,是看不到的!
你给的信息太少了,有什么错误提示吗?