Monday, August 20, 2012

Checkbox Selected value to Store in a variable


                    CheckBox chk = (CheckBox)(gridview.Rows[i].
FindControl("chkbox"));
                    if (chk.Checked)
                    {
                        TextBox txt = (TextBox)(gridview.Rows[i].
FindControl("txtfieldname"));
                        Label lab = (Label)(gridview.Rows[i].
FindControl("label2"));
                        HiddenField ht = (HiddenField)(gridview).Rows[
i].FindControl("label3");
                        hidden.Value = ht.Value;

                        dt = ex.delete_FieldList(Convert.
ToInt16(hidden.Value));
                    }

No comments:

Post a Comment


Blog Widgets