EventArgs

ASP.NET 快速入门教程
绑定到数据库
插入数据
中EventArgs处这两个代码不一样的呢?
    protected void DetailsView1_ItemUpdated(Object sender, System.Web.UI.WebControls.DetailsViewUpdatedEventArgs e)
    {
        GridView1.DataBind();
    }

    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        DetailsView1.ChangeMode(DetailsViewMode.ReadOnly);
    }

  protected void GridView1_RowDeleted(object sender, GridViewDeletedEventArgs e)
    {
        if (e.Exception != null)
        {
            ErrorMessageLabel.Text = "Failed to DELETE due to foreign key contstraint on the table.  You may only delete rows which have no related records.";
            e.ExceptionHandled = true;
        }
    }


posted on 2007-12-10 22:28 Scott Jin 阅读(272) 评论(1) 编辑 收藏

评论

#1楼  回复 引用   

All these EventArgs objects are derived from EventArgs.

This class family is used to contain the event data according to specific event object(i.e sender).

The base class EventArgs can not contain event data.(cz the different event has different kind of date set) therefore ,in order to use state information, the application must derive a subclass from eventargs. For example, command event has 2 event date:Commandname and CommandArgument
2009-02-23 10:17 | sm375

导航

<2012年2月>
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910

公告

昵称:Scott Jin
园龄:4年2个月
粉丝:0
关注:0

搜索

 
 

常用链接

随笔分类

随笔档案

文章分类

最新评论

阅读排行榜

评论排行榜

推荐排行榜