Reputation: 10712
I am using MVC 3 and I am trying to find a good source that will list the best practices for using Modal dialog forms (jQuery or any other type) and\or popup windows in my application.
For example: I have my CRUD operation Views and their corresponding controller actions but i want the to be opened in a new window\modal dialog and when close to refresh the parent opener.
I can write a lot of ugly java script to implement that but I am looking for the best practice to incorporate that in an MVC application.
Edits for certification of the question
For modal dialogs Mainly I;m having trouble to understand how would all the client side validation work when the fields are loaded dynamically into a form container how would I remap the validation triggers...
For regular popup windows I don't wan to refresh the parent page and pass a parameter to select the newly created object..
so i can go both ways but I got stuck at different stages in both of them..
validation Any suggestions or links ?
Upvotes: 0
Views: 5173
Reputation:
I found a nice tutorial that uses jQuery:
ASP MVC3 – Editing records with jQueryUI Dialogs and AjaxForms – Razor Version
ASP MVC3 – Editing records with jQueryUI Dialogs and AjaxForms – ASPX Version
http://ricardocovo.com/2011/04/03/asp-mvc3-editing-records-with-jqueryui-dialogs-and-ajaxforms/
Upvotes: 1