ASP.NET MVC and ModalPopupExtender
I am developing an application with ASP.NET MVC and wish to make use of Modal style windows.
Here is one example. On my "Login" view, I have my login details, but also have a button to create an Account for the application. I have a separate "CreateAccount" view, but would like it to pop up inside a ModalPopupWindow.
Is this possible usng just ASP MVC and the ASP.NET Ajax Library, or will I have to use a different Ajax library?
(Another way to ask this question: can I redirect the output o开发者_运维技巧f a view into a ModalPopupExtender?)
Jason
I would suggest you returning a PartialView from your controller and loading the result in some jQuery plugin to show popups in the same page context like this
The usage is something like
Boxy.load('/Account/Create'); // You can post additional data if you need to
This way you will have a beautiful Box (facebook like) with your form in it. You just have to be aware that if you post something in it, you should do it using AJAX to update the response in the same Box.
Good Luck!!
精彩评论