protected void SeeDetail(object sender, EventArgs e) { try { Button btn = (Button)(sender); pID = Convert.ToInt32(btn.CommandArgument); // test CommandArgument Details SeeDetails = new Details(pID, desc, picURL); ConnectClass.seeDetails(SeeDetails); detailView.Text = SeeDetails.Description; productPic.ImageUrl = SeeDetails.pictureURL; } catch { detailView.Text = "Failed!"; } }
protected void SeeAVG(object sender, EventArgs e) { try { Label AVG = (Label)(sender); pName = AVG.Text; Details SeeDetails = new Details(pID, desc, picURL); ConnectClass.seeDetails(SeeDetails); detailView.Text = SeeDetails.Description; productPic.ImageUrl = SeeDetails.pictureURL; } catch { detailView.Text = "Failed!"; } }