Mortalus
Mortalus

Reputation: 10712

MVC popup\modal forms best practice

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

Answers (2)

user1613714
user1613714

Reputation:

I found a nice tutorial that uses jQuery:

ASP MVC3 – Editing records with jQueryUI Dialogs and AjaxForms – Razor Version

http://ricardocovo.com/2012/04/06/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

ZedBee
ZedBee

Reputation: 2378

I am using Twitter Bootstrap in one of my Asp.net MVC 4 projects. Twitter Bootstrap modal form is easier to use than normal javascript.

Upvotes: 2

Related Questions