HOW TO SHOW A POP UP MESSAGEBOX

ravi kumar

Total Post:9

Points:63
Posted by  ravi kumar
 3273  View(s)
Ratings:
Rate this:
How to show a pop Up message box in mvc
  1. Chris Anderson

    Post:65

    Points:455
    Re: How to show a pop up messagebox

    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");
            }
    </script>

    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.


Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!