public void OnProductDetailBeingLaunched(object sender, EventArgs e) { var eventArgs = e as ProductDetailEventArgs; if (eventArgs != null) { int CategoryID = eventArgs.CategoryID, ProductID = eventArgs.ProductID; CntrlProductDetail.LoadProduct(CategoryID, ProductID); } }
protected void ProductDetailClicked(object sender, EventArgs e) { int CategoryID = 0, ProductID = 0; var lb = sender as LinkButton; if (lb != null) { string commandArgument = lb.CommandArgument; string[] commandParts = commandArgument.Split(' '); ProductID = int.Parse(commandParts[0]); CategoryID = int.Parse(commandParts[1]); CntrlProductDetail.LoadProduct(CategoryID, ProductID); upPnlCrossSell.Update(); } }