title: select2 multiple values store in database in asp.net C#
body: <p>I want to print value multiple in asp.net c# : 
  <strong>Default.aspx</strong> </p>
  
  <pre><code>&lt;asp:DropDownList runat="server" ID="ddlSkills" CssClass="form-control" multiple="multiple" &gt;
      &lt;asp:ListItem Value="HTML5"&gt;HTML5&lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="CSS3"&gt;CSS3&lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="JavaScript"&gt;JavaScript&lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="C#.NET"&gt;C#.NET&lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="Java"&gt;Java&lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="PHP"&gt;PHP&lt;/asp:ListItem&gt;
  &lt;/asp:DropDownList&gt;
  &lt;br /&gt;&lt;br /&gt;
  &lt;asp:Button runat="server" ID="btnSave" CssClass="btn btn-primary" Text="Save" OnClick="btnSave_Click" /&gt;
  </code></pre>
  
  <p>I just print one data form multiple data : <strong>Default.aspx.cs</strong> page</p>
  
  <pre><code>protected void btnSave_Click(object sender, EventArgs e)
      {
          string message = "";
          foreach(ListItem item in ddlSkills.Items)
          {
              if(item.Selected)
              {
                  message += item.Text;
              }
          }
          ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "alert('" + message + "');", true);
      }
  </code></pre>