Frontend code Copy code The code is as follows: <br>var a; <br>function CheckAll(){ <br>if(a==1) <br>{ <br>for(var i=0;i<window.document.form1.elements. length;i ) <BR>{ <BR>var e = form1.elements[i]; <BR>e.checked =false; <BR>} <BR>a=0; <BR>} <BR>else <BR>{ <BR>for(var i=0;i<window.document.form1.elements.length;i ) <BR>{ <BR>var e = form1.elements[i]; <BR>e.checked =true; <BR>} <BR>a=1; <BR>} <BR>} <BR>function CheckDel(){ <BR>var number=0; <BR>for(var i=0;i< window.document.form1.elements.length;i ) <BR>{ <BR>var e = form1.elements[i]; <BR>if (e.Name != "CheckBoxAll") <BR>{ <BR> if(e.checked==true) <BR>{ <BR>number=number 1; <BR>} <BR>} <BR>} <BR>if(number==0) <BR>{ <BR> alert("Please select the items you want to delete!"); <BR>return false; <BR>} <BR>if (window.confirm("Are you sure to delete?")) <BR>{ <BR>return true ; <BR>} <BR>else <BR>{ <BR>return false; <BR>} <BR>} <BR><asp:LinkButton ID="lbDelete" runat="server" OnClientClick="javascript: return CheckDel();" onclick="lbDelete_Click"> <br><img alt="" src="../images/del.gif" width="16" height="16" border="0" /> Delete</asp:LinkButton> <br><input id="CheckBoxAll" type="checkbox" onclick="CheckAll()" /> <br><input id="CheckBox" name= "MenuID" type="checkbox" value="<%#Eval("Menu_ID") %>" /> <br> </div> <br>Backend code<br><div class="codetitle"> <span><a style="CURSOR: pointer" data="22055" class="copybut" id="copybut22055" onclick="doCopy('code22055')"><u>Copy code</u></a></span> The code is as follows:</div> <div class="codebody" id="code22055"> <br>//Delete menu information<br>protected void lbDelete_Click(object sender, EventArgs e) <br>{ <br>ZZTJ.BLL.SysMenuInfo list = new ZZTJ.BLL.SysMenuInfo(); <br>list.Delete(Request.Form["MenuID"].ToString()); <br>BindMenus(); <br>} <br> </div>