Translate

Tuesday, 28 April 2015

Custom Dailog In MVC



IN Controller


public ActionResult Dailog()
  {
            return View();

  }


IN View


@{
    ViewBag.Title = "Dailog";
}
<html>

  
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sample</title>
<!--for dialogue-->
<!--for dialogue-->
    <link href="~/Content/css/dialog.css" rel="stylesheet" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>         
    <script src="~/Content/js/dialog.js"></script>
</head>
<body onload="$('#add').dialog()">
<div class="greyRounded" style="width:550px; display:none;" id="add">
<div class="whiteRounded" style="height:480px;">
              <img src="~/Content/images/closeBtn.png" width="32" height="32" alt="" onclick="$('#add').dialog('close')" style="cursor:pointer; float:right;" />
    <img src="~/Content/images/Chrysanthemum.jpg" />
</div>
 
</div>
    
</body>
</html>

OUTPUT



No comments:

Post a Comment