ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Display multiple Checked CheckBox Id as Comma Separated string using AngularJS in ASP.Net MVC<p>Hi&nbsp;mahesh213,</p> <p>Refer below code.</p> <p><strong><span style="text-decoration: underline;">View</span></strong></p> <pre class="brush: html">&lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&gt; &lt;head&gt; &lt;title&gt;Index&lt;/title&gt; &lt;link rel=&#34;stylesheet&#34; href=&#34;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css&#34; /&gt; &lt;script type=&#34;text/javascript&#34; src=&#34;https://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js&#34;&gt;&lt;/script&gt; &lt;script type=&#34;text/javascript&#34; src=&#34;https://cdn.jsdelivr.net/npm/angular-utils-pagination@0.11.1/dirPagination.js&#34;&gt;&lt;/script&gt; &lt;script type=&#34;text/javascript&#34;&gt; var app = angular.module(&#39;MyApp&#39;, [&#39;angularUtils.directives.dirPagination&#39;]) app.controller(&#39;MyController&#39;, function ($scope, $http, $window) { $scope.taxes = [{ Id: 1, Name: &#39;GST&#39;, Selected: false }, { Id: 2, Name: &#39;CGST&#39;, Selected: true }, { Id: 3, Name: &#39;SGST&#39;, Selected: false}]; $scope.GetChecked = function () { var checkedId = &#39;&#39;; angular.forEach($scope.taxes, function (item, index) { if (item.Selected) { checkedId += item.Id + &#34;,&#34;; } }); $scope.CId = checkedId.slice(0, checkedId.length - 1); } }); &lt;/script&gt; &lt;/head&gt; &lt;body ng-app=&#34;MyApp&#34; ng-controller=&#34;MyController&#34;&gt; &lt;div class=&#34;well&#34;&gt; &lt;div class=&#34;form-horizontal&#34;&gt; &lt;div class=&#34;row&#34;&gt; &lt;div class=&#34;col-md-3&#34;&gt; &lt;label for=&#34;Name&#34;&gt; Order Name&lt;/label&gt; &lt;input type=&#34;text&#34; id=&#34;Name&#34; class=&#34;form-control&#34; ng-model=&#34;JobName&#34; /&gt; &lt;/div&gt; &lt;div class=&#34;col-md-3&#34;&gt; &lt;label for=&#34;Job Type&#34;&gt; Description&lt;/label&gt; &lt;button type=&#34;button&#34; class=&#34;btn btn-primary btn-sm&#34; ng-init=&#34;clicked=false&#34; ng-click=&#34;clicked=!clicked&#34;&gt; View Orders &lt;/button&gt; &lt;/div&gt; &lt;div class=&#34;col-md-3&#34;&gt; &lt;label for=&#34;Name&#34;&gt; Checkbox Id&lt;/label&gt; &lt;input type=&#34;text&#34; id=&#34;CId&#34; class=&#34;form-control&#34; ng-model=&#34;CId&#34; /&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class=&#34;modal fade in&#34; aria-hidden=&#34;false&#34; style=&#34;display: block;&#34; ng-show=&#34;clicked&#34;&gt; &lt;div class=&#34;modal-dialog&#34;&gt; &lt;div class=&#34;modal-content&#34;&gt; &lt;div class=&#34;modal-header&#34;&gt; &lt;button type=&#34;button&#34; class=&#34;close&#34; ng-click=&#34;clicked=false&#34;&gt; &times; &lt;/button&gt; &lt;h4 style=&#34;margin-left: 15px; text-align: center;&#34;&gt; Subitem Details&lt;/h4&gt; &lt;/div&gt; &lt;div class=&#34;modal-body&#34;&gt; &lt;form class=&#34;form-horizontal&#34;&gt; &lt;fieldset&gt; &lt;!-- Form Name --&gt; &lt;label style=&#34;margin-left: 25px;&#34; ng-repeat=&#34;o in taxes&#34; class=&#34;checkbox&#34;&gt; &lt;input type=&#34;hidden&#34; ng-model=&#34;o.Id&#34; /&gt; &lt;input type=&#34;checkbox&#34; name=&#34;subject&#34; ng-checked=&#34;{{o.Selected}}&#34; ng-model=&#34;o.Selected&#34; /&gt;{{o.Name}} &lt;/label&gt; &lt;/fieldset&gt; &lt;/form&gt; &lt;/div&gt; &lt;div class=&#34;modal-footer&#34;&gt; &lt;button type=&#34;button&#34; class=&#34;btn btn-primary&#34; ng-click=&#34;clicked=false;GetChecked();&#34;&gt; Ok &lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt;</pre> <p><strong><span style="text-decoration: underline;">Screenshot</span></strong></p> <p><strong><span style="text-decoration: underline;"><img src="https://i.imgur.com/AbM4vSj.gif" alt="" width="230" height="255" /></span></strong></p>https://www.aspforums.net:443/Threads/779983/Display-multiple-Checked-CheckBox-Id-as-Comma-Separated-string-using-AngularJS-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/779983/Display-multiple-Checked-CheckBox-Id-as-Comma-Separated-string-using-AngularJS-in-ASPNet-MVC/Wed, 31 Jul 2019 08:25:10 GMT