I have declared this variable in jquery
var enabled = false;
I want to use it in my Html page in my Html hepler parameter like this
@Html.ListMultiple(enabled)
But this code doesn’t work since Html doesn’t know the variable because it is declared in jQuery.
No, you haven’t. That is plain JavaScript. It would still be JavaScript even if it made use of functions provided by the jQuery library, which it doesn’t.
That means you want to use it in you server side ASP code. You can’t do that.
At this stage the JavaScript is:
You can’t pass data back to the ASP that generated the page.
You could make a new HTTP request (by submitting a form, setting
location.href, using Ajax, etc) to send some data to a new invocation of an ASP program.