Hi i want to access the sessionStorage.getitem value in my Layout.cshtml.page.First i set value for sessionStoage.Set item in index page.If i move from one page to another page and again i moved to pervious page by clicking home button this session value is not maintained.
Index page
function GetAll() {
sessionStorage.setItem("CommonTypeval", typeval);
}
My code
var elecval = Session["CommonTypeval"].ToString(); ;
Any one understand my issue and help me to resolve this
Ashutosh GuptaPosted Nov 9, 2020, 12:37 PM
you can use
asp:HiddenFieldafter changed
localstorageorsessionStorageyou fill hidden field and use in code behind.Sachin SinghPosted Nov 9, 2020, 10:29 AM
Sneha KPosted Nov 9, 2020, 8:54 AM
Sachin SinghPosted Nov 9, 2020, 6:32 AM
Sneha KPosted Nov 9, 2020, 4:58 AM
Sachin SinghPosted Nov 9, 2020, 4:46 AM