Trouble with Gridview
===

I am using a template to have create my gridview. I have have basically created a check box when once select creates a session variable and I then redirect the user to a separate page. The problem is the that the event is not firing off creating the wrapper.

The event:

    void cmd1_Click(object sender, EventArgs e)
        {

            Button txtdata = (Button)sender;

            inventoryBLL inv = new inventoryBLL();

            GridViewRow gvr = (GridViewRow)txtdata.NamingContainer;

            Label myControl = new Label();

            TableCell tc = gvr.Cells[0];
            // where GridView1 is the id of your GridView and indexOfCell is your index
            foreach (Control c in tc.Controls)
            {
                if (c is Label)
                {
                    myControl = (Label)c;
                }
            }
            Label myControl1 = new Label();

            List<string> shipmentnames = new List<string>();
            List<string> asinlist = new List<string>();
            List<string> fnskulist = new List<string>();
            List<string> productlist = new List<string>();
            shipmentnames.Add(inv.shipmentname(_ShipmentID));
            asinlist.Add(myControl.Text);
            asinwrapper asin1 = new asinwrapper(asinlist, fnskulist, productlist, 0);
            asinwrapper.CreateSessionWrapper(asin1);
            ShipmentWrapper.CreateSessionWrapper(new ShipmentWrapper(shipmentnames));
          
        }

The code that I create the checkbox:

                            CheckBox cmd1 = new CheckBox();                           

                            cmd1.Text = "Change";

                            cmd1.CheckedChanged += new EventHandler(cmd1_Click);
                            
                            cmd1.AutoPostBack = true;

                            container.Controls.Add(cmd1);                            
                            
