Tuesday, 12 November 2019

How to Share JS Variable values between Razor .cshtml and Html file (a Html solution in the same solution)

I have an MVC Razor solution in which I have a separate HTML project(folder name Sub_HtmlProject from the attachment).

Question: How to use a JavaScript variable**(razorJSVar)** defined in this Razor **_Layout.cshtml Views > Shared > _Layout.cshtml

to

Sub_HtmlProject > index.html

Please note I would like to have a solution without using LocalStorage, Session, DB storage or any browser storage options.

enter image description here**



from How to Share JS Variable values between Razor .cshtml and Html file (a Html solution in the same solution)

No comments:

Post a Comment