Friday, 5 March 2021

Alert Using Toaster In MVC

 Add Success ALert Using sweet alert in Asp.net MVc



  TempData["message"] = "Job Name Created  Successfully";


 public ActionResult Index()




{ ViewBag.success = TempData["message"]; return View(); }


index.cshtml

[AcceptVerbs("Get", "Post")] [AllowAnonymous] public async Task <IActionResult> IsJobNameInUse(string JobName) { ScheduleDapper group = ScheduleDapper.CheckDuplicateJobName(JobName); if (group == null) { return Json(true); } else { return Json($"JobName {JobName} is already in use."); } }

No comments:

Post a Comment

7 Common mistakes in Dot Net — You can avoid

  There are many common mistakes made during .NET (ASP.NET, .NET Core) development, which affect performance, security, and code… Code Crack...