title: How to show a bootstrap modal success message on successfully added product to the cart
body: <p>I have written a jquery for adding product to the cart and this is the partiallistofproduct.cshtml file.</p>
  
  <pre><code>&lt;div class="container"&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-sm-9 padding-right"&gt;
              &lt;div class="features_items"&gt;
                  &lt;h2 class="admin-title text-center"&gt;&lt;/h2&gt;
                  &lt;!--Partial list of Products--&gt;
                  @foreach (var item in Model)
                  {
                      &lt;div class="features_items"&gt;
                          &lt;!--features_items--&gt;
                          &lt;div class="col-sm-4"&gt;
                              &lt;div class="product-image-wrapper"&gt;
                                  &lt;div class="single-products"&gt;
                                      &lt;div id="@item.ProductID" class="productinfo text-center"&gt;
                                          &lt;a href="@Url.Action("ReadProductDetails", "Home",new {id=item.ProductID })"&gt;
                                              &lt;img src="@Url.Content(item.ProductImage)" alt="" /&gt;
                                          &lt;/a&gt;
                                          &lt;h2&gt;Rs @item.Price&lt;/h2&gt;
                                          &lt;p&gt;@item.ProductName&lt;/p&gt;
                                          @if (Session["UserName"] != null)
                                          {
                                              &lt;p hidden id="userid"&gt;@Session["UserID"].ToString()&lt;/p&gt;}
                                          &lt;input type="hidden" id="hdnSession" data-value="@Request.RequestContext.HttpContext.Session["Name"]" /&gt;
                                          &lt;input id="AddToCart" type="submit" value="Add to Cart" class="btn btn-default add-to-cart" /&gt;
                                      &lt;/div&gt;
                                      &lt;div class="product-overlay"&gt;
                                          &lt;div id="@item.ProductID" class="overlay-content"&gt;
                                              &lt;h2&gt;Rs @item.Price&lt;/h2&gt;
                                              &lt;p id="productid"&gt;@item.ProductID&lt;/p&gt;
                                              &lt;a class="btn btn-default add-to-cart"&gt;&lt;i class="fa fa-shopping-cart"&gt;&lt;/i&gt;Add to cart&lt;/a&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;&lt;!--features_items--&gt;
  
                  }
                  &lt;!--Pagination part--&gt;
                  @Html.PagedListPager(Model, page =&gt; Url.Action("Index", new { page, pageSize = Model.PageSize }))
                  showing @Model.FirstItemOnPage to  @Model.LastItemOnPage of @Model.TotalItemCount Products
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The following is the script file to add the product to the cart.Here i am able to add the product to the cart.</p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function () {
          //on click on add to cart class this will perform
          $('.add-to-cart').click(function () {
              //checking user is logged in or not otherwise redirect to login page
              var sessionValue = $("#hdnSession").data('value');
              var aaa = parseInt($(this).closest('div').prop('id'));
              if (sessionValue != false) {
                  $.ajax({
                      url: 'Account/AddToCart',
                      data: { //Passing data
                          UserID: $("#userid").html(), //Reading text box values using Jquery
                          ProductID: $(this).closest('div').prop('id'),
                          Quantity: 1
                      },
                      type: 'POST',
                      dataType: 'json',
                      //on success message will show as an alert
                      success: function (data) {
                          if (data != null &amp;&amp; data.success) {
                              alert(data.responseText);
  
  
                          } else {
                              // DoSomethingElse()
                              alert(data.responseText);
  
                          }
  
                      },
                      //on failure error message will occur
                      error: function (data) {
                          alert("error");
                      }
                  });
              }
              else {
                  //redirection to login page
                  window.location.replace("@Url.Action("Login", "Account")");
              }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Here i want to show a bootstrap modal success message with successful adding the product to the cart. I dont know how to use bootstrap modal to show the success message.
  So please help me to show a bootstrap modal success message.</p>