Posts

Showing posts with the label MVC

ASP.NET MVC , Datatables server-side custom paging

Image
By default datatables load all record from database and then use search in client side. but it often cause problem in large data set, to load from database. So i implement custom paging and searching using jqery Bootpag pagination https://codepen.io/SitePoint/pen/jBWOMX  HTML  <div class="col-md-4">         <input type="text" class="form-control" style="float:left;"                 placeholder="Search Style size,Barcode,Product" id="myInputTextField">     </div>      <div class="col-md-12" style="margin-top: -10px;">         <div class="table-responsive" style="margin-top: 0px;">             <table id="dlWarehouseStock" class="display" cellspacing="0" width="100%">        ...

Job scheduling in aspnet mvc with quartz

From  Manage Nuget Packages  search for 'quartz' and click  Install  . OR  Typing  Install-Package Quartz  at the Package Manager Console . Create  JobScheduler   Class:     public class JobScheduler : IJob     {         public void Execute(IJobExecutionContext context)         {             string message = "";                          SchedulerService schedulerService = new SchedulerService();             schedulerService.Scheduler(out message);         }         public static void Start()         {             IScheduler scheduler = StdSchedulerFactory.GetDefaultScheduler();             scheduler.Start()...

Load static select dropdown using ViewBag MVC & C#

ViewBag.list = new SelectList(new[]             {               new { Cat_Id = "0", Cat_Name = "--Select--" },               new { Cat_Id = "1", Cat_Name = "Yarn" },               new { Cat_Id = "2", Cat_Name = "Accessories" },               new { Cat_Id = "3", Cat_Name = "Chemical" },             }, "Cat_Name", "Cat_Name", 0); @Html.DropDownList("Cat_Name", (SelectList)ViewBag.list,  new { @class = "form-control", @id = "Cat_Name" })