Created
May 12, 2013 16:07
-
-
Save beyond-code-github/5564031 to your computer and use it in GitHub Desktop.
Linq to Querystring paging sample - Index.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="body"> | |
<section class="featured"> | |
<div class="content-wrapper"> | |
<hgroup class="title"> | |
<h1>Paging with Linq to Querystring</h1> | |
</hgroup> | |
<p> | |
Look how easy it is to page data with OData and Linq to Querystring! | |
</p> | |
</div> | |
</section> | |
<section class="content-wrapper main-content clear-fix"> | |
<h3>Try out the sample:</h3> | |
<ol class="round"> | |
<li class="one"> | |
<h5>Select a page size</h5> | |
<select data-bind="value: pageSize"> | |
<option value="1">1 record</option> | |
<option value="2">2 records</option> | |
<option value="3">3 records</option> | |
<option value="4">4 records</option> | |
<option value="5">5 records</option> | |
</select> | |
</li> | |
<li class="two"> | |
<h5>Choose a page</h5> | |
<select data-bind="options: pages, value: currentPage"></select> | |
</li> | |
<li class="three"> | |
<h5>See the results</h5> | |
<button data-bind="click: getData" id="goButton">Go!</button> | |
<div id="resultsArea"> | |
<h3>Total: </h3><span data-bind="text: count"></span> | |
<table> | |
<thead> | |
<tr> | |
<th>Value</th> | |
</tr> | |
</thead> | |
<tbody data-bind="foreach: records"> | |
<tr> | |
<td data-bind="text: $data"></td> | |
</tr> | |
</tbody> | |
</table> | |
</div> | |
</li> | |
</ol> | |
</section> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment