How would I implement a common view (with/without a controller) that pops up for user confirmation (I know how to do this is javascript). Also if such a view was implemented, how would I send the ViewModel from the initial page that calls this view to the
corresponding controller that is supposed to do something with this model?
How would I implement a common view (with/without a controller) that pops up for user confirmation (I know how to do this is javascript).
The most common is to have
return window.confirm("are you sure?")
vjrag_ind
Also if such a view was implemented, how would I send the ViewModel from the initial page that calls this view to the corresponding controller that is supposed to do something with this model?
The view models can be different. And a view to handle all this could be cumbersome. Better , send a string via query string.
See http://msprogrammer.serviciipeweb.ro/2012/01/15/usual-methods-to-transfer-data-from-page-to-page-in-asp-net-mvc/
vjrag_ind
0 Points
4 Posts
A Common Confirmation Modal for all submit buttons
Apr 19, 2012 08:05 PM|LINK
How would I implement a common view (with/without a controller) that pops up for user confirmation (I know how to do this is javascript). Also if such a view was implemented, how would I send the ViewModel from the initial page that calls this view to the corresponding controller that is supposed to do something with this model?
ignatandrei
All-Star
135172 Points
21681 Posts
Moderator
MVP
Re: A Common Confirmation Modal for all submit buttons
Apr 20, 2012 02:44 AM|LINK
The most common is to have
return window.confirm("are you sure?")
The view models can be different. And a view to handle all this could be cumbersome. Better , send a string via query string.
See http://msprogrammer.serviciipeweb.ro/2012/01/15/usual-methods-to-transfer-data-from-page-to-page-in-asp-net-mvc/