Thursday, July 24, 2014

How to Show jQuery Dialog box in Asp.net or MVC

In your View HTML design

<html>
<head><title>jQuery Dialog box Demo</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
<script>
 $(document).ready(function () {
        $("#btnClick").click(function () {
           $("#divDialog").dialog('open');
           return false;
           });
        $("#divDialog").dialog({
           autoOpen: false,
           width: 900,
           resizable: false,
           modal: true,
           title: "View Content",
           width: "500px"
           });
      });

</script>
</head>
<body>

<div>
<input type="button" id="btnClick"/>
</div>
<div id="divDialog">

//Your Content Here
</div>
</body>
</html>

No comments:

Post a Comment