tags:

views:

151

answers:

2

Hi

I have an Insert button on the View Page. On this Insert Button click, there is controller Action Method (InsertUser) that inserts record.

After successful insert i want to diplay the user like a MsgBox that ("Record successfully inserted") using any plugins...etc.

Appreciate your response.

+1  A: 

You want a modal dialogue, or just a notification message?

The simplest way to do it is to stick your confirmation message into e.g. TempData["ConfirmationMessage"] and have something in your master page render the contents of that if it exists.

If you want a proper modal dialogue you'll need Javascript. Check out jQuery UI for probably the easiest one:- http://docs.jquery.com/UI/Dialog - you can use the same idea (something in your master page renders the confirmation message), then on the document ready event you have jQuery turn it into a dialogue.

Iain Galloway
I need a Modal Dialogue Message as in http://jqueryui.com/demos/dialog/#modal-message
Rita
Then you'll probably want to use jQuery UI. :)
Iain Galloway
A: 

I posted a huge answer on modal windows with mvc here: http://stackoverflow.com/questions/1843894/simple-asp-net-mvc-crud-views-opening-closing-in-javascript-ui-dialog/1844916#1844916

It outlines modal windows for forms but will probably get you 90% there. Instead of a form you'd just be retrieving some text.

jfar