.Net get the value of Checkbox in the repeater

2023-01-30  

front end

<asp:CheckBox ID=”ChkSelect” runat=”server” />
                                    <asp:HiddenField ID=”HiddenField1″ Value='<%#Eval(“cID”)%>’ runat=”server” />

back -end

 
            for (int i = 0; i < Rpt_StdInfoByEt.Items.Count; i++)
            {

                CheckBox cbx = (CheckBox)Rpt_StdInfoByEt.Items[i].FindControl(“ChkSelect”);
                HiddenField id = (HiddenField)Rpt_StdInfoByEt.Items[i].FindControl(“HiddenField1”);
                if (cbx.Checked == true)
                {

                    string [] paramsValue = new string[2];
                    paramsValue[0]= id.Value.ToString();
                    paramsValue[1] = Session[“code”].ToString();
                    COMMON.Common.ExecuteSproc(paramsValue, “sp_AddCoachBlackList”);
Response.write (<Script> Alert (‘Add Success’) </script> “);
                }
            }

source

Random Posts

AOV network

[Unreal] Weapon slot: pick up weapons

java multi-threaded problem-ThreadLocal and InheritableThreadLocal

the shortest path

vue project packing: modify the name file name