Posts

Showing posts with the label jQuery UI Dialog

Donate

ASP.NET MVC Display Confirm Dialog Before Submitting A Form Using jQuery UI Dialog

Image
Good evening. Here's an ASP.NET MVC example of showing a confirm dialog with yes/no button that returns a result either to submit a form or not using jQuery UI Dialog. This is useful especially if the form consists of multiple buttons that have the capability to submit a form. Say for example, a form has a save and delete buttons inside the BeginForm() statement and you want to extend the feature of the delete button that is to notify the user if he/she wishes to proceed with removing the form information. The existing method of showing a confirm dialog which has been practiced since ASP Classic is using the JavaScript Window.confirm dialog. But for this demo, I'll choose the jQuery UI Dialog instead of the traditional confirm dialog because the UI is more presentable to the user and this tutorial won't include database interaction for simplicity sake. To begin with, create an empty ASP.NET MVC project and add Nuget packages for jQueryUI.Combined and Bootstrap . Then ...

ASP.NET Web Forms GridView Show Confirm Dialog Using jQueryUI Dialog

Image
Good day! I've had some ASP.NET Webforms projects before that use the window confirm dialog box to prompt for alerts before doing any action in the page or control. Since I want these projects to be more interactive in nature, I decided to replace some of the confirm dialogs using jQueryUI. As of this time there are still tons of ASP.NET Webforms projects in maintenance mode. So it's safe to say that this technology will still be around for a couple of years. This tutorial does not use database but primarily focused on using the jQuery UI Dialog for ConfirmDelete action rather than using the traditional Window ConfirmDialog. To begin with, simply create an ASP.NET Webforms project with a Models folder. Inside that folder is a class that contains Contact information. [Serializable] public class Contact { public int ID { get ; set ; } public string Name { get ; set ; } public string Phone { get ; set ; } public string Address { get ; set ; } public strin...

Donate