|
1 | 1 | ---
|
2 | 2 | title: C# Tutorial on search results pagination - Azure Search
|
3 |
| -description: This tutorial builds on the "Create your first app - Azure Search" project, with the choice of two types of paging. The first uses a range of page number buttons, as well as first, next, previous, and last page buttons. The second paging system uses infinite scrolling, triggered by moving a vertical scroll bar to it's lower limit. |
| 3 | +description: This tutorial builds on the "Create your first app - Azure Search" project, with the choice of two types of paging. The first uses a range of page number buttons, as well as first, next, previous, and last page buttons. The second paging system uses infinite scrolling, triggered by moving a vertical scroll bar to its lower limit. |
4 | 4 | services: search
|
5 | 5 | ms.service: search
|
6 | 6 | ms.topic: tutorial
|
@@ -40,7 +40,7 @@ Have the basic search page solution open.
|
40 | 40 |
|
41 | 41 | 1. Open the SearchData.cs model file.
|
42 | 42 |
|
43 |
| -2. First add some global variables. In MVC global variables are declared in their own static class. **ResultsPerPage** sets the number of results per page. **MaxPageRange** determines the number of visible page numbers on the view. **PageRangeDelta** determines how many pages left or right the page range should be shifted, when the left-most or right-most page number is selected. Typically this latter number is around half of **MaxPageRange**. Add the following code into the namespace. |
| 43 | +2. First add some global variables. In MVC, global variables are declared in their own static class. **ResultsPerPage** sets the number of results per page. **MaxPageRange** determines the number of visible page numbers on the view. **PageRangeDelta** determines how many pages left or right the page range should be shifted, when the left-most or right-most page number is selected. Typically this latter number is around half of **MaxPageRange**. Add the following code into the namespace. |
44 | 44 |
|
45 | 45 | ```cs
|
46 | 46 | public static class GlobalVariables
|
@@ -367,7 +367,7 @@ Now select **Start Without Debugging** (or press the F5 key).
|
367 | 367 |
|
368 | 368 | 3. Are the "first" and "last" options useful? Some popular web searches use these options, and others do not.
|
369 | 369 |
|
370 |
| -4. Go to the the last page of results. The last page is the only page that may contain less than **ResultsPerPage** results. |
| 370 | +4. Go to the last page of results. The last page is the only page that may contain less than **ResultsPerPage** results. |
371 | 371 |
|
372 | 372 | 
|
373 | 373 |
|
@@ -396,7 +396,7 @@ To implement infinite scrolling, let's start with the project before any of the
|
396 | 396 |
|
397 | 397 | This variable is a string, which holds "next" if the next page of results should be sent, or be null for the first page of a search.
|
398 | 398 |
|
399 |
| -2. In the same file, and within the namespace, add a global variable class with one property. In MVC global variables are declared in their own static class. **ResultsPerPage** sets the number of results per page. |
| 399 | +2. In the same file, and within the namespace, add a global variable class with one property. In MVC, global variables are declared in their own static class. **ResultsPerPage** sets the number of results per page. |
400 | 400 |
|
401 | 401 | ```cs
|
402 | 402 | public static class GlobalVariables
|
@@ -589,7 +589,7 @@ Consider the following takeaways from this project:
|
589 | 589 |
|
590 | 590 | ## Next steps
|
591 | 591 |
|
592 |
| -Paging is fundamental to internet searches. With that well covered, the next step is to improve the user experience further, by adding type-ahead searches. |
| 592 | +Paging is fundamental to internet searches. With paging well covered, the next step is to improve the user experience further, by adding type-ahead searches. |
593 | 593 |
|
594 | 594 | > [!div class="nextstepaction"]
|
595 | 595 | > [C# Tutorial: Add autocompletion and suggestions - Azure Search](tutorial-csharp-type-ahead-and-suggestions.md)
|
0 commit comments