<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Ex5-6.aspx.cs" Inherits="Ex5_4" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Ex5-6</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:GridView ID="gdvnews" runat="server" AutoGenerateColumns="False">
            <Columns>
                <asp:BoundField DataField="mname" HeaderText="姓名" >
                    <ItemStyle ForeColor="Red" HorizontalAlign="Center" Width="120px" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="性别">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("msex") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server"><%#Convert.ToBoolean(Eval("msex"))?"男":"女"%></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="50px" />
                </asp:TemplateField>
                <asp:BoundField DataField="medu" HeaderText="学历" >
                    <ItemStyle HorizontalAlign="Center" Width="80px" />
                </asp:BoundField>
                <asp:BoundField DataField="mdate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="注册日期" >
                    <ItemStyle HorizontalAlign="Center" Width="120px" />
                </asp:BoundField>
            </Columns>
        </asp:GridView>
    </div>
    </form>
</body>
</html>
