My Name Is Salman Masood , I am Computer Science &Amp; Maths Graduate from University of Karachi, Pakistan , Teaching Is My Passion and My Aim Is to Deliver All My Knowledge among Those Students Who Can'T Afford Tutors or Expensive Institute Fees. I Will Be Keep Sharing My All Knowledge and Information with You .... Remember Me in Your Prayers !
Wednesday, 7 November 2018
Loading Progress Bar in asp.net mvc using ajax,jquery and Bootstrap Modal
@model WebApplication28.Models.tbl_employee
@{
ViewBag.Title = "Home Page";
}
<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<link href="~/Content/bootstrap.min.css" rel="stylesheet" />
<script src="~/Scripts/bootstrap.min.js"></script>
<style>
td{
padding:10px;
}
</style>
<div class="container">
<br />
<a href="#" class="btn btn-block btn-success" data-toggle="modal" data-target="#myModal">Add a new Record</a>
<div class="modal fade" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<a href="#" class="close" data-dismiss="modal">×</a>
<h3 class="modal-title">Add a new Record! </h3>
</div>
<div class="modal-body">
<form id="myForm">
<table >
<tr>
<td>Name: </td>
<td>@Html.TextBoxFor(x => x.emp_name, new {@class="form-control" }) </td>
</tr>
<tr>
<td>Contact: </td>
<td>@Html.TextBoxFor(x => x.emp_contact, new { @class = "form-control" }) </td>
</tr>
</table>
</form>
<div style="text-align:center;display:none" id="loaderDiv">
<img src="~/Content/img/tenor.gif" />
</div>
</div>
<div class="modal-footer">
<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>
<input type="reset" value="Submit" class="btn btn-success" id="btnSubmit" />
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
$("#btnSubmit").click(function () {
$("#loaderDiv").show();
var myformdata = $("#myForm").serialize();
$.ajax({
type: "POST",
url: "/Home/Index",
data: myformdata,
success: function ()
{
$("#loaderDiv").hide();
$("#myModal").modal("hide");
}
})
})
})
</script>
Subscribe to:
Posts (Atom)
Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC
Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...
-
Load event: pictureBox3.Image = Image .FromFile( @"C:\Users\salman\Documents\Visual Studio 2013\Projects\WindowsFormsApplication3\W...