DataTextField = "id" CommandName = "update" DataTextFormatString = "Modify {0}"> Add event handler to Grid This.DataGrid1.itemCommand = new system.Web.ui.WebControls.DataGridCommandeventHandler (this.excuteItemCommand); The corresponding processing is as follows private void ExcuteItemCommand (object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) {string ItemID = e.Item.Cells [0] .Text; if (e.CommandName == "del") {ProductManager.DeleteProduct (ItemID This.response.redirect ("./ myProductList.aspx? Isbuy =" isbuy);} else if (e.commandname == "update") {this.response.redirect ("./ updateproduct.aspx? ProductID = " Itemid " & isbuy = " isbuy);}} CommandName is from // Need to pay attention to the price in Page_Load, ispostback