OUTPUT VIEW:
Project File structure:
Index.cshtml
This file is responsible for your User Interface design. In ASP.NET MVC framework in every controller there is always a specific views associated with it. In this case we are using HomeController so the folder from Views->Home->index.cshtml is our main view. Navigate to this file and copy and paste code below.
Note:
- <script src=”~/Scripts/jquery-1.10.2.min.js”></script> -> include JQuery Script from Scripts folder
- <script src=”~/Scripts/function.js”></script> -> include function.js Script
Code:
@{
ViewBag.Title = "Basic function";
}
<div class="row">
<div class="body-content">
<div class="panel panel-default">
<div class="panel-heading"><h4>Sample Project</h4></div>
<div class="panel-body">
<table id="data" class="table table-striped table-hover"></table>
</div>
<div class="panel-footer">
</div>
</div>
</div>
</div>
<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<script src="~/Scripts/function.js"></script>
Code:
@{ ViewBag.Title = "Basic function"; } <div class="row"> <div class="body-content"> <div class="panel panel-default"> <div class="panel-heading"><h4>Sample Project</h4></div> <div class="panel-body"> <table id="data" class="table table-striped table-hover"></table> </div> <div class="panel-footer"> </div> </div> </div> </div> <script src="~/Scripts/jquery-1.10.2.min.js"></script> <script src="~/Scripts/function.js"></script>
No comments:
Post a Comment