I know you say that session is "no use at all" but that sounds like your simplest solution. You can setup a class to handle reading/writing to session and then reference that in all of your controllers and views.
Create a session variables class...or whatever you want to call it.
using ...
namespace Application.Data
{
public static class SessionVariables
{
private static object GetValue(string AttrName)
{
return HttpContext.Current.Session[AttrName];
}
private static void SetValue(string AttrName, object AttrValue)
{
HttpContext.Current.Session[AttrName] = AttrValue;
}
public static int PageIndex
{
get => (int?)GetValue("pageIndex") ?? 0;
set => SetValue("pageIndex", value);
}
}
}
To reference in your view...
@using Application.Data
@{
var index = SessionVariables.PageIndex;
}
This same logic can be used in your controllers.