Home > DeveloperSection > Forums > How to show a pop up messagebox
ravi kumar

Total Post:9

Posted on    November-02-2011 11:03 PM


 1 Reply(s)
 3206  View(s)
Rate this:
How to show a pop Up message box in mvc

Chris Anderson
Chris Anderson

Total Post:65

Posted on    November-03-2011 1:05 AM

hi ravi,

To open a pop up message box, create a java-script function as shown below:

<script type="text/javascript">
        function openPopup() {
            var answer = confirm("Are you sure");

then call that function wherever you want. I call it on the click of hyperlink.

<%: Html.ActionLink("Open Popup", "Index", "Home", new { id = "popup", onclick = "openPopup()" })%>

you can modify your popup box with the help of java-script and css. Here I had simply given a demo.

Don't want to miss updates? Please click the below button!

Follow MindStick