file:///C:\Users\j\Desktop\WebSite\User.aspx结合Dao.cs

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" %>

<script runat="server">

    protected void Page_Load(object sender, EventArgs e)
    {
        GridView1.Load += new EventHandler(GridView1_Load);
        GridView1.PreRender += new EventHandler(GridView1_PreRender);
        GridView1.PageIndexChanging += new GridViewPageEventHandler(GridView1_PageIndexChanging);
        GridView1.RowEditing += new GridViewEditEventHandler(GridView1_RowEditing);
        GridView1.RowCancelingEdit += new GridViewCancelEditEventHandler(GridView1_RowCancelingEdit);
        GridView1.RowUpdating += new GridViewUpdateEventHandler(GridView1_RowUpdating);
        GridView1.RowDeleting += new GridViewDeleteEventHandler(GridView1_RowDeleting);
    }

    protected void GridView1_Load(object sender, EventArgs e)
    {
        Dao.GridViewUser(GridView1);
    }

    protected void GridView1_PreRender(object sender, EventArgs e)
    {
        Dao.BangDingUser(GridView1);
    }

    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView1.PageIndex = e.NewPageIndex;
    }

    protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
    {
        GridView1.EditIndex = e.NewEditIndex;
    }

    protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        Dao.UpdateUser(GridView1, e.RowIndex);
    }

    protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
    {
        GridView1.EditIndex = -1;
    }

    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        Dao.DeleteUser(GridView1, e.RowIndex);
    }
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:GridView ID="GridView1" runat="server">
    </asp:GridView>
</asp:Content>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值