@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf
@Html.AntiForgeryToken()
<
script
type
=
"text/x-kendo-tmpl"
id
=
"template"
>
<
a
class
=
"product CB"
href
=
"/de/Details/#:SEOLink#"
>
<
div
class
=
"H160 C"
>
#if (IsIMG == '1') { #
<
img
src
=
"https://xxxxx.com/img/#:SEOLink#-150.jpg"
alt
=
"#:SEOLink#"
/>
# } #
#if (IsIMG == '0') { #
<
div
class
=
"fxacce H160"
><
p
>No Image Available</
p
></
div
>
# } #
</
div
>
<
hr
class
=
"HRGld0"
/>
</
a
>
</
script
>
@(Html.Kendo().ListView<
TEST.Pages.Movies.BluRayModel
>()
.Name("listView")
.TagName("div")
.HtmlAttributes(new { style = "border: none;" })
.DataSource(dataSource => dataSource
.Ajax()
.Read(r => r.Url(Model.GetRead).Data("forgeryToken"))
.PageSize(30)
)
.ClientTemplateId("template")
.Pageable()
)
<
script
>
function forgeryToken() {
return kendo.antiForgeryTokens();
}
</
script
>
Standard List View, nothing special. In the template, there is an "a href" link which redirects the user to a details page for the item.
The user clicks on the item, which redirects them to the details page, this works well.
The problem is when the click the "back" button on the browser to get back to the list view, the paging starts at page 1 and not the page they were looking at (example: page 5)
How can I retain the current page value? I guess I need somehow to fetch the current page the user is looking at, and then store it in a session variable. Thanks for the guidance.