Control control = null;

        //first we will check the "__EVENTTARGET" because if post back made by       the controls

        //which used "_doPostBack" function also available in Request.Form collection.

        string ctrlname = Page.Request.Params["__EVENTTARGET"];

        if (ctrlname != null && ctrlname != String.Empty)

        {

            control = Page.FindControl(ctrlname);

        }

        // if __EVENTTARGET is null, the control is a button type and we need to

        // iterate over

posted on 2010-05-20 11:38  秦威龙  阅读(188)  评论(0)    收藏  举报