How to show data in a modal(Popup) using Jquery

Hi Everyone,

I want to display all users in model(Popup) using jQuery.
Here, Below my view page code is:

    ViewBag.Title = "Users";
    <script src="~/Scripts/jquery-1.8.2.min.js"></script>
    <script src="~/Scripts/jquery-ui-1.8.24.js"></script>
    <link href="~/Content/Site.css" rel="stylesheet" />
    <link href="~/Content/themes/base/jquery.ui.all.css" rel="stylesheet" />
@Html.ActionLink("All Users", "User", "Home", null, new
    @class = "openDialog",
    data_dialog_id = "aboutDialog",
    data_dialog_title = "About Us"
<div id="aboutDialog">
<p><a href="javascript:void(0);" class="close">Close this Window</a></p>
<script type="text/javascript">
    $.ajaxSetup({ cache: false });
    $(document).ready(function () {
        $(".openDialog").live("click", function (e) {
                .attr("id", $(this)
                    title: $(this).attr("data-dialog-title"),
                    close: function () { $(this).remove(); },
                    modal: true,
                    height: 250,
                    width: 400,
                    left: 0
        $(".close").live("click", function (e) {


Please Can anyone give me a solution.

Thank you.

Last updated:5/2/2016 12:29:01 AM

1 Answers