Private void page_load (object sender, system.eventargs e) {string isbuy = this.Request.QueryString.get ("isbuy"); string username = (string) session ["UserName"]; if (! this.ispostback) { This.DataGrid1.datasource = ProductManager.getProductListBYOWNAME (UserName, ISBUY); this.DataGrid1.database ();} // Place the user code here to initialize the page}
#Region Web Form Designer Generated Code Override Protected Void OnNit (Eventargs E) {// // Codegen: This call is required for the ASP.NET Web Form Designer. // InitializeComponent (); base.onit (e);} ///
} #Endregion
private void ExcuteItemCommand (object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) {if (e.CommandName == "del") {ProductManager.DeleteProduct (e.Item.Cells [0] .Text);
This.Response.Redirect (...);}}
// Basic ideas is to build a column that is not displayed.
// Get the text content of the current item based on this column
/ / Then delete