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.Add Items to ASP.Net ListBox using JavaScript<p>This way</p> <pre class="brush: xml">&lt;asp:ListBox ID=&#34;ListBox1&#34; runat=&#34;server&#34; Width=&#34;150&#34; Height=&#34;60&#34; SelectionMode=&#34;Multiple&#34;&gt; &lt;/asp:ListBox&gt; &lt;br /&gt; &lt;br /&gt; &lt;asp:Button ID=&#34;btnAdd&#34; Text=&#34;Add&#34; runat=&#34;server&#34; OnClientClick=&#34;return AddValues()&#34; /&gt; &lt;script type=&#34;text/javascript&#34;&gt; function AddValues() { var value = prompt(&#34;Please enter values.&#34;, &#34;&#34;); var listBox = document.getElementById(&#34;ListBox1&#34;); var option = document.createElement(&#34;OPTION&#34;); option.innerHTML = value; option.value = value; listBox.appendChild(option); return false; } &lt;/script&gt;</pre>https://www.aspforums.net:443/Threads/314134/Add-Items-to-ASPNet-ListBox-using-JavaScript/https://www.aspforums.net:443/Threads/314134/Add-Items-to-ASPNet-ListBox-using-JavaScript/Wed, 11 Mar 2015 00:00:09 GMT