@using Oqtane.Skins @using Oqtane.Shared; @using Microsoft.JSInterop @inject IJSRuntime jsRuntime @inherits SkinObjectBase @functions { string displayMode = ""; protected override async Task OnInitAsync() { var interop = new Interop(jsRuntime); string value = await interop.GetCookie("blazor"); if (value == "client") { displayMode = "Server Mode"; } else { displayMode = "Client Mode"; } } public async void SetMode() { var interop = new Interop(jsRuntime); string mode = await interop.GetCookie("blazor"); if (mode == "client") { mode = "server"; } else { mode = "client"; } await interop.SetCookie("blazor", mode, 7); } }