Hello C# Corner,
I want to pass to two Variables (Data = x1, Charge = x2) from Cshtml page to Aspx Page.
Anybody with JavaScript help or Other language with code sample or online material.
Will be appreciated .
Thanks,
Beavon
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Kirtan ParmarRank #3,426 · 422 reputationPosted Mar 1, 2016, 8:37 AM EST
write this code on cshtml page :
localStorage.setItem('data1', 'value1');
and to get this value on aspx page write below code :
var data1 = localStorage.getItem('data1');