In this post going to share to code-sample for the Add and Remove items form one ListBox to another ListBox in asp.net with c#. Some time before, i have needed to add and remove to user role as per your requirements and update the user role in the database. Table of Constants 1. In the 1st step, code-sample for aspx page. 2. In the 2nd step, code-sample for C# (.cs page). In the 1st step , .aspx code-sample < asp : Content ID ="HeaderContent" runat ="server" ContentPlaceHolderID ="HeadContent"> < asp : ListBox runat ="server" ID ="listBoxRoles1" SelectionMode =" Multiple " ></ asp : ListBox > < asp : Button ID ="btn_Add" runat ="server" Text ="Add" onclick ="btn_Add_Click" /> < asp : Button ID ="btn_Remove" runat ="server" Text ="Remove" onclick ="btn_Remove_Click"
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers