You can't. Period.
That's not how client/server programming works.
The variable in JavaScript is in the browser, which is in some computer in an airplane flying over the Pacific Ocean, say.
The C# code is on the server, sitting on the ground in London, say.
There is no way for the C# code to "reach out" and grab the value of that
JS variable and use it.
The only way to get the value from the browser to the server is to *SEND* it there. With ASP.NET programming, that probably means copying the variable's value into a HIDDEN FORM FIELD and then submitting the form. Then the C# code can get the value from the submitted form.
You need to read up on the fundamentals of HTTP and client/server programming. Wish I could point you to a good book, but I can't think of the right one, off hand.